geometry

package
v0.0.1 Latest Latest
Warning

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

Go to latest
Published: May 24, 2020 License: Apache-2.0 Imports: 0 Imported by: 2

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type CircularString

type CircularString struct {
	Points []*Point
	Type   CoordinateType
}

CircularString is wkt circularString representation

func (*CircularString) GetGeometryType

func (p *CircularString) GetGeometryType() Type

GetGeometryType returns geometry type

type CoordinateType

type CoordinateType uint8

CoordinateType is coordinates type such as XY, XYZ, XYM, XYZM

const (
	Undefined CoordinateType = 0 + iota
	XY
	XYZ
	XYM
	XYZM
	Empty
)

Coordinate types dependent on coordinate system

type Geometry

type Geometry interface {
	GetGeometryType() Type
}

Geometry is an interface for different geometry types

type LineString

type LineString struct {
	Points []*Point
	Type   CoordinateType
}

LineString is wkt lineString representation

func (*LineString) GetGeometryType

func (p *LineString) GetGeometryType() Type

GetGeometryType returns geometry type

type MultiLineString

type MultiLineString struct {
	Lines []*LineString
	Type  CoordinateType
}

MULTILINESTRING

func (MultiLineString) GetGeometryType

func (m MultiLineString) GetGeometryType() Type

type MultiPoint

type MultiPoint struct {
	Points []*Point
	Type   CoordinateType
}

MultiPoint is wkt multiPoint representation

func (*MultiPoint) GetGeometryType

func (m *MultiPoint) GetGeometryType() Type

GetGeometryType returns geometry type

type MultiPolygon

type MultiPolygon struct {
	Polygons []*Polygon
	Type     CoordinateType
}

func (*MultiPolygon) GetGeometryType

func (m *MultiPolygon) GetGeometryType() Type

type NumberOfCoordinates

type NumberOfCoordinates int

NumberOfCoordinates is a count coordinates for different coordinates types

const (
	NumUndefined NumberOfCoordinates = 0
	NumXY        NumberOfCoordinates = 2
	NumXYZ       NumberOfCoordinates = 3
	NumXYM       NumberOfCoordinates = 3
	NumXYZM      NumberOfCoordinates = 4
)

type Point

type Point struct {
	X, Y, Z, M float64
	Type       CoordinateType
}

Point is wkt point representation

func (*Point) GetGeometryType

func (p *Point) GetGeometryType() Type

GetGeometryType returns geometry type

type Polygon

type Polygon struct {
	LineStrings []*LineString
	Type        CoordinateType
}

Polygon is wkt polygon representation

func (*Polygon) GetGeometryType

func (p *Polygon) GetGeometryType() Type

GetGeometryType returns geometry type

type Type

type Type uint8

Type is geometry type such as Point, LineString, Polygon etc.

const (
	UndefinedGT Type = 0 + iota

	PointGT
	MultyPointGT

	LineStringGT
	CircularStringGT
	MultiLineStringGT

	PolygonGT
	MultiPolygonGT
)

Jump to

Keyboard shortcuts

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