geom

package module
v0.0.0-...-a009b50 Latest Latest
Warning

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

Go to latest
Published: Feb 18, 2016 License: BSD-2-Clause Imports: 2 Imported by: 0

Documentation

Index

Constants

View Source
const (
	TwoD = iota
	Z
	M
	ZM
)
View Source
const (
	X = iota
	Y
)

Variables

This section is empty.

Functions

func Similar

func Similar(t1, t2 T, e float64) bool

Types

type Bounds

type Bounds struct {
	Min, Max Point
}

func NewBounds

func NewBounds() Bounds

func NewBoundsPoint

func NewBoundsPoint(point Point) Bounds

func (Bounds) Copy

func (b Bounds) Copy() Bounds

func (Bounds) Empty

func (b Bounds) Empty() bool

func (Bounds) ExtendPoint

func (b Bounds) ExtendPoint(point Point) Bounds

func (Bounds) ExtendPoints

func (b Bounds) ExtendPoints(points []Point) Bounds

func (Bounds) ExtendPointss

func (b Bounds) ExtendPointss(pointss Polygon) Bounds

func (Bounds) IsZero

func (b Bounds) IsZero() bool

func (Bounds) Overlaps

func (b1 Bounds) Overlaps(b2 Bounds) bool

type Feature

type Feature struct {
	T
	Properties interface{}
}

Create a Feature to serialize GeoJSON with additional arbitrary properties. Properties may be any JSON-serializable value. Encoding a Feature to another format, like WKT, will only encode the geometry, not the properties.

func NewFeature

func NewFeature(t T, properties interface{}) Feature

type FeatureCollection

type FeatureCollection struct {
	Features   []T
	Properties interface{}
}

func (FeatureCollection) AppendFeature

func (f FeatureCollection) AppendFeature(newFeature Feature) FeatureCollection

func (FeatureCollection) AppendGeometry

func (f FeatureCollection) AppendGeometry(t T, properties interface{}) FeatureCollection

func (FeatureCollection) Bounds

func (f FeatureCollection) Bounds(b Bounds) Bounds

type GeometryCollection

type GeometryCollection []T

func (GeometryCollection) Bounds

func (geometryCollection GeometryCollection) Bounds(b Bounds) Bounds

type LineString

type LineString []Point

func (LineString) Bounds

func (lineString LineString) Bounds(b Bounds) Bounds

type MultiLineString

type MultiLineString []LineString

func (MultiLineString) Bounds

func (multiLineString MultiLineString) Bounds(b Bounds) Bounds

type MultiPoint

type MultiPoint []Point

func (MultiPoint) Bounds

func (multiPoint MultiPoint) Bounds(b Bounds) Bounds

type MultiPolygon

type MultiPolygon []Polygon

func (MultiPolygon) Bounds

func (multiPolygon MultiPolygon) Bounds(b Bounds) Bounds

type Point

type Point []float64

The first two components of Point are X and Y. You may use as many additional components as you like for Z, M, etc. They are ignored, but preserved for GeoJSON encoding.

func New2Point

func New2Point(x, y float64) Point

func NewNPoint

func NewNPoint(s ...float64) Point

func (Point) Bounds

func (point Point) Bounds(b Bounds) Bounds

func (Point) Equal

func (point Point) Equal(other Point) bool

type Polygon

type Polygon []Ring

func (Polygon) Bounds

func (polygon Polygon) Bounds(b Bounds) Bounds

type Ring

type Ring []Point

type T

type T interface {
	Bounds(Bounds) Bounds
}

Directories

Path Synopsis
encoding
hex
wkb
wkt
Package geomop provides implementation of algorithms for geometry operations.
Package geomop provides implementation of algorithms for geometry operations.

Jump to

Keyboard shortcuts

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