geometry

package module
v0.0.9 Latest Latest
Warning

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

Go to latest
Published: Jan 11, 2022 License: MIT Imports: 9 Imported by: 0

Documentation

Index

Constants

View Source
const (
	TypePoint             string = "Point"
	TypeLineString        string = "LineString"
	TypePolygon           string = "Polygon"
	TypeMultiPoint        string = "MultiPoint"
	TypeMultiLineString   string = "MultiLineString"
	TypeMultiPolygon      string = "MultiPolygon"
	TypeFeature           string = "Feature"
	TypeFeatureCollection string = "FeatureCollection"
)

Variables

This section is empty.

Functions

This section is empty.

Types

type IGeometry added in v0.0.6

type IGeometry interface {
	Geometry() geom.Geometry
}

func ReadInputConstraints added in v0.0.3

func ReadInputConstraints(inputJsonFile string) []IGeometry

type JSONLineString added in v0.0.3

type JSONLineString struct {
	Id          string
	Coordinates [][]float64
	Meta        string
}

type JSONPoint added in v0.0.3

type JSONPoint struct {
	Id          string
	Coordinates []float64
	Meta        string
}

type JSONPolygon added in v0.0.3

type JSONPolygon struct {
	Id          string
	Coordinates [][][]float64
	Meta        string
}

type JSONType added in v0.0.8

type JSONType struct {
	Type string `json:"type"`
}

type Point

type Point struct {
	G    geom.Point
	Id   string
	Meta string
}

func CreatePoint added in v0.0.2

func CreatePoint(id string, coordinates []float64, meta string) Point

CreatePoint constructs a new point

func (Point) Geometry added in v0.0.4

func (g Point) Geometry() geom.Geometry

Geometry interface

type Polygon

type Polygon struct {
	G    *geom.Polygon
	Id   string
	Meta string
}

func CreatePolygon added in v0.0.2

func CreatePolygon(id string, coordinates []geom.Coords, meta string) Polygon

CreatePolygon creates a new Polygon

func (Polygon) Geometry added in v0.0.4

func (g Polygon) Geometry() geom.Geometry

Geometry interface

type Polyline

type Polyline struct {
	G    *geom.LineString
	Id   string
	Meta string
}

Polyline Type

func CreatePolyline

func CreatePolyline(id string, coordinates geom.Coords, meta string) Polyline

CreatePolyline construct new polyline

func ReadInputPolylines added in v0.0.3

func ReadInputPolylines(inputJsonFile string) []Polyline

func (Polyline) Geometry added in v0.0.4

func (pln Polyline) Geometry() geom.Geometry

Geometry interface

func (*Polyline) Len

func (pln *Polyline) Len() int

Len - number of coordinates in polyline

func (*Polyline) Range

func (pln *Polyline) Range() rng.Rng

Range of entire polyline

func (*Polyline) Segment

func (pln *Polyline) Segment(i, j int) *geom.Segment

Segment given range

func (*Polyline) SegmentBounds

func (pln *Polyline) SegmentBounds() []mono.MBR

SegmentBounds computes segment bounds

func (*Polyline) SubCoordinates

func (pln *Polyline) SubCoordinates(rng rng.Rng) geom.Coords

SubCoordinates - generates sub polyline from generator indices

func (*Polyline) SubPolyline

func (pln *Polyline) SubPolyline(rng rng.Rng) Polyline

SubPolyline - generates sub polyline from generator indices

Jump to

Keyboard shortcuts

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