# README
go-geom
Package geom implements efficient geometry types for geospatial applications.
Key features
- OpenGeo Consortium-style geometries.
- Support for 2D and 3D geometries, measures (time and/or distance), and unlimited extra dimensions.
- Encoding and decoding of common geometry formats (GeoJSON, KML, WKB, and
others) including
sql.Scanner
anddriver.Value
interface implementations for easy database integration. - 2D and 3D topology functions.
- Efficient, cache-friendly internal representation.
Detailed features
Geometry types
Encoding and decoding
Geometry functions
Related libraries
- github.com/twpayne/go-gpx GPX encoding and decoding
- github.com/twpayne/go-kml KML encoding
- github.com/twpayne/go-polyline Google Maps Polyline encoding and decoding
- github.com/twpayne/go-vali IGC validation
# Packages
Package bigxy contains robust geographic functions on planar (xy) data.
No description provided by the author
No description provided by the author
No description provided by the author
Package xy contains low-level planar (xy) geographic functions.
Package xyz contains operations in 3d coordinate space.
# Functions
Must panics if err is not nil, otherwise it returns g.
NewBounds creates a new Bounds.
NewGeometryCollection returns a new GeometryCollection with the specified geometries.
NewLinearRing returns a new LinearRing with no coordinates.
NewLinearRingFlat returns a new LinearRing with the given flat coordinates.
NewLineString returns a new LineString with layout l and no control points.
NewLineStringFlat returns a new LineString with layout l and control points flatCoords.
NewMultiLineString returns a new MultiLineString with no LineStrings.
NewMultiLineStringFlat returns a new MultiLineString with the given flat coordinates.
NewMultiPoint returns a new, empty, MultiPoint.
NewMultiPointFlat returns a new MultiPoint with the given flat coordinates.
NewMultiPolygon returns a new MultiPolygon with no Polygons.
NewMultiPolygonFlat returns a new MultiPolygon with the given flat coordinates.
NewPoint allocates a new Point with layout l and all values zero.
NewPointFlat allocates a new Point with layout l and flat coordinates flatCoords.
NewPolygon returns a new, empty, Polygon.
NewPolygonFlat returns a new Polygon with the given flat coordinates.
# Structs
A Bounds represents a multi-dimensional bounding box.
An ErrLayoutMismatch is returned when geometries with different layouts cannot be combined.
An ErrStrideMismatch is returned when the stride does not match the expected stride.
An ErrUnsupportedType is returned when the requested type is not supported.
A GeometryCollection is a collection of arbitrary geometries with the same SRID.
A LinearRing is a linear ring.
A LineString represents a single, unbroken line, linearly interpreted between zero or more control points.
A MultiLineString is a collection of LineStrings.
A MultiPoint is a collection of Points.
A MultiPolygon is a collection of Polygons.
A Point represents a single point.
A Polygon represents a polygon as a collection of LinearRings.
# Interfaces
T is a generic interface implemented by all geometry types.
# Type aliases
A Coord represents an N-dimensional coordinate.
An ErrUnsupportedLayout is returned when the requested layout is not supported.
A Layout describes the meaning of an N-dimensional coordinate.