Versions in this module Expand all Collapse all v0 v0.1.2 May 29, 2014 Changes in this version + var ErrLineInterpolatePointDist = errors.New("distance must between 0 and 1") + var ErrLineInterpolatePointType = errors.New("geometry must be a linestring") + func Error() error + func Version() string + type BufferOpts struct + CapStyle CapStyle + JoinStyle JoinStyle + MitreLimit float64 + QuadSegs int + type CapStyle int + const CapFlat + const CapRound + const CapSquare + type Coord struct + X float64 + Y float64 + Z float64 + func MustCoords(c []Coord, err error) []Coord + func NewCoord(x, y float64) Coord + func (c Coord) String() string + type Geometry struct + func EmptyPolygon() (*Geometry, error) + func FromHex(hex string) (*Geometry, error) + func FromWKB(wkb []byte) (*Geometry, error) + func FromWKT(wkt string) (*Geometry, error) + func Must(g *Geometry, err error) *Geometry + func NewCollection(_type GeometryType, geoms ...*Geometry) (*Geometry, error) + func NewLineString(coords ...Coord) (*Geometry, error) + func NewLinearRing(coords ...Coord) (*Geometry, error) + func NewPoint(coords ...Coord) (*Geometry, error) + func NewPolygon(shell []Coord, holes ...[]Coord) (*Geometry, error) + func PolygonFromGeom(shell *Geometry, holes ...*Geometry) (*Geometry, error) + func (g *Geometry) Area() (float64, error) + func (g *Geometry) Boundary() (*Geometry, error) + func (g *Geometry) Buffer(d float64) (*Geometry, error) + func (g *Geometry) BufferWithOpts(width float64, opts BufferOpts) (*Geometry, error) + func (g *Geometry) Centroid() (*Geometry, error) + func (g *Geometry) Clone() (*Geometry, error) + func (g *Geometry) Contains(other *Geometry) (bool, error) + func (g *Geometry) ConvexHull() (*Geometry, error) + func (g *Geometry) CoordDimension() int + func (g *Geometry) Coords() ([]Coord, error) + func (g *Geometry) CoveredBy(other *Geometry) (bool, error) + func (g *Geometry) Covers(other *Geometry) (bool, error) + func (g *Geometry) Crosses(other *Geometry) (bool, error) + func (g *Geometry) Difference(other *Geometry) (*Geometry, error) + func (g *Geometry) Dimension() int + func (g *Geometry) Disjoint(other *Geometry) (bool, error) + func (g *Geometry) Distance(other *Geometry) (float64, error) + func (g *Geometry) EndPoint() (*Geometry, error) + func (g *Geometry) Envelope() (*Geometry, error) + func (g *Geometry) Equals(other *Geometry) (bool, error) + func (g *Geometry) EqualsExact(other *Geometry, tolerance float64) (bool, error) + func (g *Geometry) Geometry(n int) (*Geometry, error) + func (g *Geometry) HasZ() (bool, error) + func (g *Geometry) HausdorffDistance(other *Geometry) (float64, error) + func (g *Geometry) HausdorffDistanceDensify(other *Geometry, densifyFrac float64) (float64, error) + func (g *Geometry) Hex() ([]byte, error) + func (g *Geometry) Holes() ([]*Geometry, error) + func (g *Geometry) Interpolate(dist float64) (*Geometry, error) + func (g *Geometry) Intersection(other *Geometry) (*Geometry, error) + func (g *Geometry) Intersects(other *Geometry) (bool, error) + func (g *Geometry) IsClosed() (bool, error) + func (g *Geometry) IsEmpty() (bool, error) + func (g *Geometry) IsRing() (bool, error) + func (g *Geometry) IsSimple() (bool, error) + func (g *Geometry) Length() (float64, error) + func (g *Geometry) LineInterpolatePoint(dist float64) (*Geometry, error) + func (g *Geometry) LineMerge() (*Geometry, error) + func (g *Geometry) NCoordinate() (int, error) + func (g *Geometry) NGeometry() (int, error) + func (g *Geometry) NPoint() (int, error) + func (g *Geometry) Normalize() error + func (g *Geometry) OffsetCurve(distance float64, opts BufferOpts) (*Geometry, error) + func (g *Geometry) Overlaps(other *Geometry) (bool, error) + func (g *Geometry) Point(n int) (*Geometry, error) + func (g *Geometry) PointOnSurface() (*Geometry, error) + func (g *Geometry) Prepare() *PGeometry + func (g *Geometry) Project(p *Geometry) float64 + func (g *Geometry) ProjectNormalized(p *Geometry) float64 + func (g *Geometry) Relate(other *Geometry) (string, error) + func (g *Geometry) RelatePat(other *Geometry, pat string) (bool, error) + func (g *Geometry) SRID() (int, error) + func (g *Geometry) SetSRID(srid int) + func (g *Geometry) SharedPaths(other *Geometry) (*Geometry, error) + func (g *Geometry) Shell() (*Geometry, error) + func (g *Geometry) Simplify(tolerance float64) (*Geometry, error) + func (g *Geometry) SimplifyP(tolerance float64) (*Geometry, error) + func (g *Geometry) Snap(other *Geometry, tolerance float64) (*Geometry, error) + func (g *Geometry) StartPoint() (*Geometry, error) + func (g *Geometry) String() string + func (g *Geometry) SymDifference(other *Geometry) (*Geometry, error) + func (g *Geometry) ToWKT() (string, error) + func (g *Geometry) Touches(other *Geometry) (bool, error) + func (g *Geometry) Type() (GeometryType, error) + func (g *Geometry) UnaryUnion() (*Geometry, error) + func (g *Geometry) Union(other *Geometry) (*Geometry, error) + func (g *Geometry) UniquePoints() (*Geometry, error) + func (g *Geometry) WKB() ([]byte, error) + func (g *Geometry) Within(other *Geometry) (bool, error) + func (g *Geometry) X() (float64, error) + func (g *Geometry) Y() (float64, error) + type GeometryType C.int + const GEOMETRYCOLLECTION + const LINEARRING + const LINESTRING + const MULTILINESTRING + const MULTIPOINT + const MULTIPOLYGON + const POINT + const POLYGON + func (t GeometryType) String() string + type JoinStyle int + const JoinBevel + const JoinMitre + const JoinRound + type PGeometry struct + func PrepareGeometry(g *Geometry) *PGeometry + func (p *PGeometry) Contains(other *Geometry) (bool, error) + func (p *PGeometry) ContainsP(other *Geometry) (bool, error) + func (p *PGeometry) CoveredBy(other *Geometry) (bool, error) + func (p *PGeometry) Covers(other *Geometry) (bool, error) + func (p *PGeometry) Crosses(other *Geometry) (bool, error) + func (p *PGeometry) Disjoint(other *Geometry) (bool, error) + func (p *PGeometry) Intersects(other *Geometry) (bool, error) + func (p *PGeometry) Overlaps(other *Geometry) (bool, error) + func (p *PGeometry) Touches(other *Geometry) (bool, error) + func (p *PGeometry) Within(other *Geometry) (bool, error)