Documentation ¶
Index ¶
- func ApplyToPoints(geometry tegola.Geometry, f func(coords ...float64) ([]float64, error)) (tegola.Geometry, error)
- func CloneGeometry(geometry tegola.Geometry) (tegola.Geometry, error)
- func FromWebMercator(SRID int, geometry tegola.Geometry) (tegola.Geometry, error)
- func ToWebMercator(SRID int, geometry tegola.Geometry) (tegola.Geometry, error)
- type Collection
- type Line
- type MultiLine
- type MultiPoint
- type MultiPoint3
- type MultiPolygon
- type Point
- type Point3
- type Polygon
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func ApplyToPoints ¶
func ApplyToPoints(geometry tegola.Geometry, f func(coords ...float64) ([]float64, error)) (tegola.Geometry, error)
ApplyToPoints applys the given function to each point in the geometry and any sub geometries, return a new transformed geometry.
func CloneGeometry ¶
CloneGeomtry returns a deep clone of the Geometry.
func FromWebMercator ¶ added in v0.2.0
FromWebMercator takes a geometry encoded with WebMercator, and returns a Geometry encodes to the given srid.
Types ¶
type Collection ¶
type Collection []interface {
// contains filtered or unexported methods
}
Collection type can represent one or more other basic types.
func (*Collection) Geometeries ¶
func (c *Collection) Geometeries() (geometeries []tegola.Geometry)
Geometeries return a set of geometeies that make that collection.
func (Collection) String ¶
func (Collection) String() string
type Line ¶
type Line []Point
Line is a basic line type which is made up of two or more points that don't interect. TODO: We don't really check to make sure the points don't intersect.
type MultiLine ¶
type MultiLine []Line
MultiLine is a set of lines.
func (*MultiLine) Lines ¶
func (ml *MultiLine) Lines() (lines []tegola.LineString)
Lines are the lines in a Multiline
type MultiPoint ¶
type MultiPoint []Point
MultiPoint describes a simple set of 2d points
func (*MultiPoint) Points ¶
func (v *MultiPoint) Points() (points []tegola.Point)
Points are the points that make up the set
func (*MultiPoint) String ¶
func (*MultiPoint) String() string
type MultiPoint3 ¶
type MultiPoint3 []Point3
MultiPoint3 describes a simple set of 3d points
func (*MultiPoint3) Points ¶
func (v *MultiPoint3) Points() (points []tegola.Point)
Points are the points that make up the set
func (*MultiPoint3) String ¶
func (*MultiPoint3) String() string
type MultiPolygon ¶
type MultiPolygon []Polygon
MultiPolygon describes a set of polygons.
func (*MultiPolygon) Polygons ¶
func (mp *MultiPolygon) Polygons() (polygons []tegola.Polygon)
Polygons retuns the polygons that make up the set.
func (MultiPolygon) String ¶
func (MultiPolygon) String() string