Documentation ¶
Overview ¶
Package geom provides functions for building geometries.
Index ¶
- Variables
- func AsGeomElement(g *geos.Geos, geom *geos.Geom) (*element.Geometry, error)
- func BuildRelGeometry(rel *element.Relation, rings []*Ring, srid int) (*geos.Geom, error)
- func BuildRelation(rel *element.Relation, srid int) error
- func LineString(g *geos.Geos, nodes []element.Node) (*geos.Geom, error)
- func Point(g *geos.Geos, node element.Node) (*geos.Geom, error)
- func Polygon(g *geos.Geos, nodes []element.Node) (*geos.Geom, error)
- func PrepareRelation(rel *element.Relation, srid int) (*preparedRelation, error)
- type GeomError
- type Ring
- type SortableRingsDesc
Constants ¶
This section is empty.
Variables ¶
View Source
var ( ErrorOneNodeWay = NewGeomError("need at least two separate nodes for way", 0) ErrorNoRing = NewGeomError("linestrings do not form ring", 0) )
Functions ¶
func BuildRelGeometry ¶
BuildRelGeometry builds the geometry of rel by creating a multipolygon of all rings. rings need to be sorted by area (large to small).
Types ¶
type GeomError ¶
type GeomError struct {
// contains filtered or unexported fields
}
func NewGeomError ¶
type Ring ¶
type Ring struct {
// contains filtered or unexported fields
}
func (*Ring) MarkInserted ¶
type SortableRingsDesc ¶
type SortableRingsDesc []*Ring
func (SortableRingsDesc) Len ¶
func (r SortableRingsDesc) Len() int
func (SortableRingsDesc) Less ¶
func (r SortableRingsDesc) Less(i, j int) bool
func (SortableRingsDesc) Swap ¶
func (r SortableRingsDesc) Swap(i, j int)
Directories ¶
Path | Synopsis |
---|---|
Package geojson creates GEOS geometries from GeoJSON files.
|
Package geojson creates GEOS geometries from GeoJSON files. |
Package geos provides a wrapper to the GEOS library.
|
Package geos provides a wrapper to the GEOS library. |
Package limit provides functions to clip geometries at polygon boundaries.
|
Package limit provides functions to clip geometries at polygon boundaries. |
Click to show internal directories.
Click to hide internal directories.