mvt

package
v0.0.10-a Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: May 3, 2016 License: MIT Imports: 4 Imported by: 0

Documentation

Index

Constants

View Source
const (
	MoveTo    = 0x1
	LineTo    = 0x2
	ClosePath = 0x7
)
View Source
const VT_VERSION = 2

Variables

This section is empty.

Functions

This section is empty.

Types

type CursorType

type CursorType string
const (
	AbsCur CursorType = "ABSOLUTE"
	RelCur CursorType = "RELATIVE"
)

type Feature

type Feature struct {
	// contains filtered or unexported fields
}

func NewFeatureAdapter

func NewFeatureAdapter(id *uint64, geometry_type string, props map[string]interface{}) (feature *Feature)

func (*Feature) AddShape

func (f *Feature) AddShape(shapes ...*Shape)

type Geometry

type Geometry struct {
	// contains filtered or unexported fields
}

type Layer

type Layer struct {
	// contains filtered or unexported fields
}

func (*Layer) AddFeature

func (l *Layer) AddFeature(feature *Feature) error

type Point

type Point struct {
	X, Y int
}

func (Point) Add

func (p Point) Add(that Point) Point

func (Point) Decrement

func (p Point) Decrement(x, y int) Point

func (Point) Increment

func (p Point) Increment(x, y int) Point

func (Point) Subtract

func (p Point) Subtract(that Point) Point

type Shape

type Shape struct {
	// contains filtered or unexported fields
}

func MakeShape

func MakeShape(length int) *Shape

func NewLine

func NewLine(points ...Point) *Shape

func NewPointShape

func NewPointShape(points ...Point) *Shape

func NewPolygon

func NewPolygon(points ...Point) *Shape

func NewShape

func NewShape(geomType vt.Tile_GeomType, points ...Point) *Shape

func (*Shape) Append

func (s *Shape) Append(point Point)

func (*Shape) Equals

func (s *Shape) Equals(that *Shape) bool

func (*Shape) GetCursorType

func (s *Shape) GetCursorType() CursorType

func (*Shape) GetPoints

func (s *Shape) GetPoints() []Point

func (*Shape) Head

func (s *Shape) Head() Point

func (*Shape) Insert

func (s *Shape) Insert(i int, p Point) (err error)

func (*Shape) Tail

func (s *Shape) Tail() Point

func (*Shape) ToCommands

func (s *Shape) ToCommands() (cmds []*command)

type TileAdapter

type TileAdapter struct {
	// contains filtered or unexported fields
}

func NewTileAdapter

func NewTileAdapter(x, y, z uint) *TileAdapter

func (*TileAdapter) GetTile

func (t *TileAdapter) GetTile() *vt.Tile

func (*TileAdapter) GetTileBytes

func (t *TileAdapter) GetTileBytes() ([]byte, error)

func (*TileAdapter) GetTileGz

func (t *TileAdapter) GetTileGz() ([]byte, error)

func (*TileAdapter) NewLayer

func (t *TileAdapter) NewLayer(name string, extent uint) (layer *Layer)

Directories

Path Synopsis
Package vector_tile provides the go code needed to read and write Mapbox vector tiles (https://github.com/mapbox/vector-tile-spec).
Package vector_tile provides the go code needed to read and write Mapbox vector tiles (https://github.com/mapbox/vector-tile-spec).

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL