geos

package
v0.0.0-...-85720d3 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: May 7, 2014 License: Apache-2.0 Imports: 5 Imported by: 0

Documentation

Overview

Package geos provides a wrapper to the GEOS library.

Index

Constants

This section is empty.

Variables

View Source
var NilBounds = Bounds{1e20, 1e20, -1e20, -1e20}

Functions

This section is empty.

Types

type Bounds

type Bounds struct {
	MinX float64
	MinY float64
	MaxX float64
	MaxY float64
}

type CoordSeq

type CoordSeq struct {
	// contains filtered or unexported fields
}

func (*CoordSeq) AsLineString

func (this *CoordSeq) AsLineString(handle *Geos) (*Geom, error)

func (*CoordSeq) AsLinearRing

func (this *CoordSeq) AsLinearRing(handle *Geos) (*Geom, error)

func (*CoordSeq) AsPoint

func (this *CoordSeq) AsPoint(handle *Geos) (*Geom, error)

func (*CoordSeq) SetXY

func (this *CoordSeq) SetXY(handle *Geos, i uint32, x, y float64) error

type CreateError

type CreateError string

func (CreateError) Error

func (e CreateError) Error() string

type Error

type Error string

func (Error) Error

func (e Error) Error() string

type Geom

type Geom struct {
	// contains filtered or unexported fields
}

func (*Geom) Area

func (this *Geom) Area() float64

func (*Geom) Bounds

func (this *Geom) Bounds() Bounds

func (*Geom) Length

func (this *Geom) Length() float64

type Geos

type Geos struct {
	// contains filtered or unexported fields
}

func NewGeos

func NewGeos() *Geos

func (*Geos) AsEwkbHex

func (this *Geos) AsEwkbHex(geom *Geom) []byte

func (*Geos) AsWkb

func (this *Geos) AsWkb(geom *Geom) []byte

func (*Geos) AsWkt

func (this *Geos) AsWkt(geom *Geom) string

func (*Geos) BoundsPolygon

func (this *Geos) BoundsPolygon(bounds Bounds) *Geom

func (*Geos) Buffer

func (this *Geos) Buffer(geom *Geom, size float64) *Geom

func (*Geos) Clone

func (this *Geos) Clone(geom *Geom) *Geom

func (*Geos) Contains

func (this *Geos) Contains(a, b *Geom) bool

func (*Geos) CreateCoordSeq

func (this *Geos) CreateCoordSeq(size, dim uint32) (*CoordSeq, error)

func (*Geos) CreateIndex

func (this *Geos) CreateIndex() *Index

func (*Geos) Destroy

func (this *Geos) Destroy(geom *Geom)

func (*Geos) DestroyCoordSeq

func (this *Geos) DestroyCoordSeq(coordSeq *CoordSeq)

func (*Geos) DestroyLater

func (this *Geos) DestroyLater(geom *Geom)

func (*Geos) Equals

func (this *Geos) Equals(a, b *Geom) bool

func (*Geos) ExteriorRing

func (this *Geos) ExteriorRing(geom *Geom) *Geom

func (*Geos) Finish

func (this *Geos) Finish()

func (*Geos) FromWkb

func (this *Geos) FromWkb(wkb []byte) *Geom

func (*Geos) FromWkt

func (this *Geos) FromWkt(wkt string) *Geom

func (*Geos) Geoms

func (this *Geos) Geoms(geom *Geom) []*Geom

func (*Geos) IndexAdd

func (this *Geos) IndexAdd(index *Index, geom *Geom)

IndexQuery adds a geom to the index with the id.

func (*Geos) IndexQuery

func (this *Geos) IndexQuery(index *Index, geom *Geom) []IndexGeom

IndexQuery queries the index for intersections with geom.

func (*Geos) Intersection

func (this *Geos) Intersection(a, b *Geom) *Geom

func (*Geos) Intersects

func (this *Geos) Intersects(a, b *Geom) bool

func (*Geos) IsEmpty

func (this *Geos) IsEmpty(geom *Geom) bool

func (*Geos) IsValid

func (this *Geos) IsValid(geom *Geom) bool

func (*Geos) LineMerge

func (this *Geos) LineMerge(lines []*Geom) []*Geom

LineMerge tries to merge lines. Returns slice of LineStrings. Destroys lines and returns new allocated LineString Geoms.

func (*Geos) MultiLineString

func (this *Geos) MultiLineString(lines []*Geom) *Geom

func (*Geos) MultiPolygon

func (this *Geos) MultiPolygon(polygons []*Geom) *Geom

func (*Geos) NumGeoms

func (this *Geos) NumGeoms(geom *Geom) int32

func (*Geos) Point

func (this *Geos) Point(x, y float64) *Geom

func (*Geos) Polygon

func (this *Geos) Polygon(exterior *Geom, interiors []*Geom) *Geom

func (*Geos) Prepare

func (this *Geos) Prepare(geom *Geom) *PreparedGeom

func (*Geos) PreparedContains

func (this *Geos) PreparedContains(a *PreparedGeom, b *Geom) bool

func (*Geos) PreparedDestroy

func (this *Geos) PreparedDestroy(geom *PreparedGeom)

func (*Geos) PreparedIntersects

func (this *Geos) PreparedIntersects(a *PreparedGeom, b *Geom) bool

func (*Geos) SetHandleSrid

func (this *Geos) SetHandleSrid(srid int)

func (*Geos) SimplifyPreserveTopology

func (this *Geos) SimplifyPreserveTopology(geom *Geom, tolerance float64) *Geom

func (*Geos) Type

func (this *Geos) Type(geom *Geom) string

func (*Geos) UnionPolygons

func (this *Geos) UnionPolygons(polygons []*Geom) *Geom

UnionPolygons tries to merge polygons. Returns a single (Multi)Polygon. Destroys polygons and returns new allocated (Multi)Polygon as necessary.

type Index

type Index struct {
	// contains filtered or unexported fields
}

type IndexGeom

type IndexGeom struct {
	Geom *Geom
}

IndexGeom is a struct for indexed geometries used by Index and returned by IndexQuery.

type PreparedGeom

type PreparedGeom struct {
	// contains filtered or unexported fields
}

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL