grandine: Index | Files | Directories

package spaten

import ""


Package Files

chunks.go codec.go lowlevel.go

func PackFeature Uses

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 Uses

func ReadBlocks(r io.Reader, fs *spatial.FeatureCollection) error

ReadBlocks is a function for reading all features from a file at once.

func UnpackFeature Uses

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 Uses

func WriteBlock(w io.Writer, fs []spatial.Feature, meta map[string]interface{}) error

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 Uses

func WriteFileHeader(w io.Writer) error

type Chunks Uses

type Chunks struct {
    // contains filtered or unexported fields

func (*Chunks) Next Uses

func (c *Chunks) Next() bool

func (*Chunks) Scan Uses

func (c *Chunks) Scan(fc *spatial.FeatureCollection) error

type Codec Uses

type Codec struct {
    // contains filtered or unexported fields

func (*Codec) ChunkedDecode Uses

func (c *Codec) ChunkedDecode(r io.Reader) (spatial.Chunks, error)

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) Close Uses

func (c *Codec) Close(w io.Writer) error

func (*Codec) Decode Uses

func (c *Codec) Decode(r io.Reader, fc *spatial.FeatureCollection) error

func (*Codec) Encode Uses

func (c *Codec) Encode(w io.Writer, fc *spatial.FeatureCollection) error

func (*Codec) EncodeChunk Uses

func (c *Codec) EncodeChunk(w io.Writer, fc *spatial.FeatureCollection) error

EncodeChunk enqueues features to be written out. Call Close when done with the stream.

func (*Codec) Extensions Uses

func (c *Codec) Extensions() []string
type Header struct {
    Version int

func ReadFileHeader Uses

func ReadFileHeader(r io.Reader) (Header, error)


fileformatPackage fileformat is a generated protocol buffer package.

Package spaten imports 9 packages (graph) and is imported by 4 packages. Updated 2019-05-22. Refresh now. Tools for package owners.