mvt

package
v0.0.13-a Latest Latest
Warning

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

Go to latest
Published: Jun 15, 2016 License: MIT Imports: 7 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 Box

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

func NewBox

func NewBox(sw, ne Point) (b Box, err error)

func (Box) Clip

func (b Box) Clip(shp *Shape)

Clip assumes that the union of b U s != nil (they overlap) if there is an intersection, c.points is backed by s.points

func (Box) Contains

func (b Box) Contains(p Point) bool

func (Box) ToShape

func (b Box) ToShape() *Shape

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)

func (*Feature) Valid

func (f *Feature) Valid() bool

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) Delete

func (s *Shape) Delete(i int) (p 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) Len

func (s *Shape) Len() int

func (*Shape) Tail

func (s *Shape) Tail() Point

func (*Shape) ToCommands

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

type TileAdapter

type TileAdapter struct {
	X, Y, Z int
	// contains filtered or unexported fields
}

func NewTileAdapter

func NewTileAdapter(x, y, z int) *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 int) (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