Documentation ¶
Index ¶
- Variables
- func NewCursor(tile tegola.BoundingBox, layerExtent int) *cursor
- type Command
- type Feature
- type Layer
- func (l *Layer) AddFeatures(features ...Feature) (skipped bool)
- func (l *Layer) Extent() int
- func (l *Layer) Features() (f []Feature)
- func (l *Layer) RemoveFeature(idxs ...int)
- func (l *Layer) SetExtent(e int)
- func (l *Layer) VTileLayer(ctx context.Context, extent tegola.BoundingBox) (*vectorTile.Tile_Layer, error)
- func (*Layer) Version() int
- type Provider
- type Tile
Constants ¶
This section is empty.
Variables ¶
var ( ErrNilFeature = fmt.Errorf("Feature is nil") // ErrUnknownGeometryType is the error retuned when the geometry is unknown. ErrUnknownGeometryType = fmt.Errorf("Unknown geometry type") ErrNilGeometryType = fmt.Errorf("Nil geometry passed") )
errors
var ErrCanceled = context.Canceled
Functions ¶
func NewCursor ¶ added in v0.4.0
func NewCursor(tile tegola.BoundingBox, layerExtent int) *cursor
Types ¶
type Feature ¶
type Feature struct { ID *uint64 Tags map[string]interface{} // Does not support the collection geometry, for this you have to create a feature for each // geometry in the collection. Geometry tegola.Geometry // Unsimplifed weather the Geometry is simple already and thus does not need to be simplified. Unsimplifed *bool }
Feature describes a feature of a Layer. A layer will contain multiple features each of which has a geometry describing the interesting thing, and the metadata associated with it.
func NewFeatures ¶
NewFeatures returns one or more features for the given Geometry TODO: Should we consider supporting validation of polygons and multiple polygons here?
func (*Feature) VTileFeature ¶
func (f *Feature) VTileFeature(ctx context.Context, keys []string, vals []interface{}, extent tegola.BoundingBox, layerExtent int) (tf *vectorTile.Tile_Feature, err error)
VTileFeature will return a vectorTile.Feature that would represent the Feature
type Layer ¶
type Layer struct { // This is the name of the feature, is has to be unique within a tile. Name string // contains filtered or unexported fields }
Layer describes a layer in the tile. Each layer can have multiple features which describe drawing.
func (*Layer) AddFeatures ¶
AddFeatures will add one or more Features to the Layer, if a features ID is a the same as Any already in the Layer, it will ignore those features. If the id fields is nil, the feature will always be added.
func (*Layer) Features ¶
Features returns a copy of the features in the layer, use the index of the this array to remove any features from the layer
func (*Layer) RemoveFeature ¶
RemoveFeature allows you to remove one or more features, with the provided indexes. To figure out the indexes, use the indexs from the Features array.
func (*Layer) VTileLayer ¶
func (l *Layer) VTileLayer(ctx context.Context, extent tegola.BoundingBox) (*vectorTile.Tile_Layer, error)
VTileLayer returns a vectorTile Tile_Layer object that represents this layer.
type Provider ¶
type Provider interface { // MVTLayer returns a layer object based MVTLayer(ctx context.Context, layerName string, tile tegola.Tile, tags map[string]interface{}) (*Layer, error) // LayerNames returns a list of layer name the Provider knows about. LayerNames() []string }
Provider is the mechanism by which the system talks to different data providers.
type Tile ¶
type Tile struct {
// contains filtered or unexported fields
}
Tile describes a tile.
func TileFromVTile ¶
TODO: What is this functions suppose to do? TileFromVTile will return a Tile object from the given vectorTile Tile object
Directories ¶
Path | Synopsis |
---|---|
Package vectorTile is a generated protocol buffer package.
|
Package vectorTile is a generated protocol buffer package. |