Documentation ¶
Overview ¶
Package tegola describes the basic geometeries that can be used to convert to and from.
Index ¶
- Constants
- func GeometryAsJSON(g Geometry, w io.Writer) error
- func GeometryAsMap(g Geometry) map[string]interface{}
- func GeometryAsString(g Geometry) string
- func IsCollectionEqual(c1, c2 Collection) bool
- func IsGeometryEqual(g1, g2 Geometry) bool
- func IsLineStringEqual(l1, l2 LineString) bool
- func IsMultiLineEqual(ml1, ml2 MultiLine) bool
- func IsMultiPointEqual(mp1, mp2 MultiPoint) bool
- func IsMultiPolygonEqual(mp1, mp2 MultiPolygon) bool
- func IsPoint3Equal(p1, p2 Point3) bool
- func IsPointEqual(p1, p2 Point) bool
- func IsPolygonEqual(p1, p2 Polygon) bool
- type BoundingBox
- type Collection
- type Geometry
- type LineString
- type MultiLine
- type MultiPoint
- type MultiPolygon
- type Point
- type Point3
- type Polygon
- type Tile
Constants ¶
const ( WebMercator = 3857 WGS84 = 4326 )
const ( DefaultEpislon = 5 DefaultExtent = 4096 )
const (
ProviderPostGIS string = "postgis"
)
Variables ¶
This section is empty.
Functions ¶
func GeometryAsMap ¶ added in v0.4.0
func GeometryAsString ¶ added in v0.4.0
func IsCollectionEqual ¶ added in v0.4.0
func IsCollectionEqual(c1, c2 Collection) bool
CollectionIsEqual will check to see if the provided collections are equal. This function does not check to see if the collections contain any recursive structures, and if there are any recursive structures it will hang. If the collections contains any unknown geometries it will be assumed to not match.
func IsGeometryEqual ¶ added in v0.4.0
GeometryIsEqual will check to see if the two given geometeries are equal. This function does not check to see if there are any recursive structures if there are any recursive structures it will hang. If the type of the geometry is unknown, it is assumed that it does not match any other geometries.
func IsLineStringEqual ¶ added in v0.4.0
func IsLineStringEqual(l1, l2 LineString) bool
IsLineStringEqual will check to see if the two linesstrings provided are equal.
func IsMultiLineEqual ¶ added in v0.4.0
IsMultiLineEqual will check to see if the two Multilines that are provided are equal.
func IsMultiPointEqual ¶ added in v0.4.0
func IsMultiPointEqual(mp1, mp2 MultiPoint) bool
IsMultiPointEqual will check to see if the two provided multipoints are equal
func IsMultiPolygonEqual ¶ added in v0.4.0
func IsMultiPolygonEqual(mp1, mp2 MultiPolygon) bool
MultiPolygonIsEqual will check to see if the two provided multi-polygons are equal.
func IsPoint3Equal ¶ added in v0.4.0
IsPoint3Equal will check to see if the two 3d tegola points are equal.
func IsPointEqual ¶ added in v0.4.0
IsPointEqual will check to see if the two tegola points are equal.
func IsPolygonEqual ¶ added in v0.4.0
PolygonIsEqual will check to see if the two provided polygons are equal.
Types ¶
type BoundingBox ¶
type BoundingBox struct {
Minx, Miny, Maxx, Maxy float64
// Epsilon is the tolerance for the simplification function.
Epsilon float64
}
BoundingBox defines the extent of a tile
type Collection ¶
Collection is a collections of different geometries.
type LineString ¶
LineString is a Geometry of a line.
type MultiLine ¶
type MultiLine interface { Geometry Lines() []LineString }
MultiLine is a Geometry with multiple individual lines.
type MultiPoint ¶
MultiPoint is a Geometry with multiple individual points.
type MultiPolygon ¶
MultiPolygon describes a Geometry multiple intersecting polygons. There should only one exterior polygon, and the rest of the polygons should be interior polygons. The interior polygons will exclude the area from the exterior polygon.
type Point3 ¶
Point3 is a point with three dimensions; at current is just converted and treated as a point.
type Polygon ¶
type Polygon interface { Geometry Sublines() []LineString }
Polygon is a multi-line Geometry where all the lines connect to form an enclose space.
type Tile ¶
Tile slippy map tilenames
http://wiki.openstreetmap.org/wiki/Slippy_map_tilenames
func (*Tile) BoundingBox ¶
func (t *Tile) BoundingBox() BoundingBox
BoundingBox returns the bound box coordinates for upper left (ulx, uly) and lower right (lrx, lry) in web mercator projection ported from: https://raw.githubusercontent.com/mapbox/postgis-vt-util/master/postgis-vt-util.sql
Source Files ¶
Directories ¶
Path | Synopsis |
---|---|
cmd
|
|
tegola
tegola server
|
tegola server |
Config loads and understand the tegola config format.
|
Config loads and understand the tegola config format. |
container
|
|
debug
|
|
log
Log package
|
Log package |
!build
|
!build |
mapbox
|
|
Package math contins generic math functions that we need for doing transforms.
|
Package math contins generic math functions that we need for doing transforms. |
webmercator
Package webmercator does the translation to and from WebMercator and WGS84 Gotten from: http://wiki.openstreetmap.org/wiki/Mercator#C.23
|
Package webmercator does the translation to and from WebMercator and WGS84 Gotten from: http://wiki.openstreetmap.org/wiki/Mercator#C.23 |
vector_tile
Package vectorTile is a generated protocol buffer package.
|
Package vectorTile is a generated protocol buffer package. |
provider
|
|
Package server implements the http frontend
|
Package server implements the http frontend |
TileJSON https://github.com/mapbox/tilejson-spec
|
TileJSON https://github.com/mapbox/tilejson-spec |
util
|
|
dict
This file was generated using gen.pl and go fmt.
|
This file was generated using gen.pl and go fmt. |
Package wkb is for decoding ESRI's Well Known Binary (WKB) format for OGC geometry (WKBGeometry) sepcification at http://edndoc.esri.com/arcsde/9.1/general_topics/wkb_representation.htm There are a few types supported by the specification.
|
Package wkb is for decoding ESRI's Well Known Binary (WKB) format for OGC geometry (WKBGeometry) sepcification at http://edndoc.esri.com/arcsde/9.1/general_topics/wkb_representation.htm There are a few types supported by the specification. |