Documentation ¶
Index ¶
- func PackFeature(f spatial.Feature) (fileformat.Feature, error)
- func ReadBlocks(r io.Reader, fs *spatial.FeatureCollection) error
- func UnpackFeature(pf *fileformat.Feature) (spatial.Feature, error)
- func WriteBlock(w io.Writer, fs []spatial.Feature, meta map[string]interface{}) error
- func WriteFileHeader(w io.Writer) error
- type Chunks
- type Codec
- func (c *Codec) ChunkedDecode(r io.Reader) (spatial.Chunks, error)
- func (c *Codec) Close(w io.Writer) error
- func (c *Codec) Decode(r io.Reader, fc *spatial.FeatureCollection) error
- func (c *Codec) Encode(w io.Writer, fc *spatial.FeatureCollection) error
- func (c *Codec) EncodeChunk(w io.Writer, fc *spatial.FeatureCollection) error
- func (c *Codec) Extensions() []string
- type Header
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func PackFeature ¶
func PackFeature(f spatial.Feature) (fileformat.Feature, error)
PackFeature encapusaltes a spatial feature into an encodable Spaten feature. This is a low level interface and not guaranteed to be stable.
func ReadBlocks ¶
func ReadBlocks(r io.Reader, fs *spatial.FeatureCollection) error
ReadBlocks is a function for reading all features from a file at once.
func UnpackFeature ¶
func UnpackFeature(pf *fileformat.Feature) (spatial.Feature, error)
UnpackFeature unpacks a Spaten feature into a usable spatial feature. This is a low level interface and not guaranteed to be stable.
func WriteBlock ¶
WriteBlock writes a block of spatial data (note that every valid Spaten file needs a file header in front). meta may be nil, if you don't wish to add any block meta.
func WriteFileHeader ¶
Types ¶
type Codec ¶
type Codec struct {
// contains filtered or unexported fields
}
func (*Codec) ChunkedDecode ¶
ChunkedDecode is the preferred method for reading large datasets. It retrieves a file block at a time, making it possible to traverse the file in a streaming manner without allocating enough memory to fit the whole file.
func (*Codec) EncodeChunk ¶
EncodeChunk enqueues features to be written out. Call Close when done with the stream.
func (*Codec) Extensions ¶
Directories ¶
Path | Synopsis |
---|---|
Package fileformat is a generated protocol buffer package.
|
Package fileformat is a generated protocol buffer package. |