Documentation ¶
Overview ¶
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. Each general type is in it's own file. So, to find the implementation of Point (and MultiPoint) it will be located in the point.go file. Each of the basic type here adhere to the tegola.Geometry interface. So, a wkb point is, also, a tegola.Point
Index ¶
Constants ¶
const ( GeoPoint uint32 = 1 GeoLineString = 2 GeoPolygon = 3 GeoMultiPoint = 4 GeoMultiLineString = 5 GeoMultiPolygon = 6 GeoGeometryCollection = 7 )
geometry types
http://edndoc.esri.com/arcsde/9.1/general_topics/wkb_representation.htm
Variables ¶
This section is empty.
Functions ¶
Types ¶
type Collection ¶
type Collection []Geometry
Collection is a collection of geometries.
func (*Collection) String ¶
func (col *Collection) String() string
func (Collection) Type ¶
func (Collection) Type() uint32
Type returns the type number of this geometry, by the spec it's 7.
type Geometry ¶
Geometry describes a basic Geometry type that can decode it's self.
func Decode ¶
Decode is the main function that given a io.Reader will attempt to decode the Geometry from the byte stream.
func DecodeBytes ¶
DecodeBytes will decode the type into a Geometry
type LineString ¶
type LineString []Point
LineString describes a line, that is made up of two or more points
func (*LineString) String ¶
func (ls *LineString) String() string
String returns the WKT representation of the Geometry
func (*LineString) Subpoints ¶
func (ls *LineString) Subpoints() (pts []tegola.Point)
Subpoints returns a copy of the points that make up the Line.
func (LineString) Type ¶
func (LineString) Type() uint32
Type returns the type constant for a LineString
type MultiLineString ¶
type MultiLineString []LineString
MultiLineString represents one or more independent lines.
func (*MultiLineString) Lines ¶
func (ml *MultiLineString) Lines() (lns []tegola.LineString)
Lines return the indivual lines in the grouping.
func (*MultiLineString) String ¶
func (ml *MultiLineString) String() string
String returns the WKT representation of the Geometry.
func (MultiLineString) Type ¶
func (MultiLineString) Type() uint32
Type returns the Type constant for a Multiline String.
type MultiPoint ¶
type MultiPoint []Point
MultiPoint holds one or more independent points in a group
func (MultiPoint) Points ¶
func (mp MultiPoint) Points() (pts []tegola.Point)
Points returns a copy of the points in the group.
func (MultiPoint) String ¶
func (mp MultiPoint) String() string
String returns the WTK version of the geometry.
func (MultiPoint) Type ¶
func (MultiPoint) Type() uint32
Type returns the type constant for a Mulipoint geometry
type MultiPolygon ¶
type MultiPolygon []Polygon
MultiPolygon holds multiple polygons.
func (*MultiPolygon) Decode ¶
Decode decodes the binary representation of a Multipolygon and decodes it into a Multipolygon object.
func (*MultiPolygon) Polygons ¶
func (mp *MultiPolygon) Polygons() (pls []tegola.Polygon)
Polygons return the sub polygons of a Multipolygon.
func (*MultiPolygon) String ¶
func (mp *MultiPolygon) String() string
type Point ¶
Point is a basic type, this describes a 2D point.
type Polygon ¶
type Polygon []LineString
Polygon is a Geometry of one or more rings. The first ring is assumed to be the outer bounding ringer, and traversed in a clockwise manner. The remaining rings should be within the bounding area of the first ring, and is traversed in a counterclockwise manner, these represent holes in the polygon.
func (*Polygon) Sublines ¶
func (p *Polygon) Sublines() (lns []tegola.LineString)
Sublines returns a copy of the rings that make up the polygon.