geometry

package
v0.0.0-...-33ee0dc Latest Latest
Warning

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

Go to latest
Published: Jan 8, 2022 License: Apache-2.0 Imports: 0 Imported by: 18

Documentation

Index

Constants

View Source
const (
	TypePoint              = "Point"
	TypeLineString         = "LineString"
	TypePolygon            = "Polygon"
	TypeMultiPoint         = "MultiPoint"
	TypeMultiLineString    = "MultiLineString"
	TypeMultiPolygon       = "MultiPolygon"
	TypeGeometryCollection = "GeometryCollection"
)

Variables

This section is empty.

Functions

This section is empty.

Types

type GeometryCollection

type GeometryCollection struct {
	Type        string      `json:"type" bson:"type" map:"type"` //default: GeometryCollection
	Coordinates interface{} `json:"coordinates" bson:"coordinates" map:"coordinates"`
}

func NewGeometryCollection

func NewGeometryCollection(coordinates interface{}) GeometryCollection

type LineString

type LineString struct {
	Type        string             `json:"type" bson:"type" map:"type"` //default: LineString
	Coordinates []PointCoordinates `json:"coordinates" bson:"coordinates" map:"coordinates"`
}

func NewLineString

func NewLineString(coordinates []PointCoordinates) LineString

type MultiLineString

type MultiLineString struct {
	Type        string               `json:"type" bson:"type" map:"type"` //default: MultiLineString
	Coordinates [][]PointCoordinates `json:"coordinates" bson:"coordinates" map:"coordinates"`
}

func NewMultiLineString

func NewMultiLineString(coordinates [][]PointCoordinates) MultiLineString

type MultiPoint

type MultiPoint struct {
	Type        string             `json:"type" bson:"type" map:"type"` //default: MultiPoint
	Coordinates []PointCoordinates `json:"coordinates" bson:"coordinates" map:"coordinates"`
}

func NewMultiPoint

func NewMultiPoint(coordinates []PointCoordinates) MultiPoint

type MultiPolygon

type MultiPolygon struct {
	Type        string                 `json:"type" bson:"type" map:"type"` //default: MultiPolygon
	Coordinates [][][]PointCoordinates `json:"coordinates" bson:"coordinates" map:"coordinates"`
}

func NewMultiPolygon

func NewMultiPolygon(coordinates [][][]PointCoordinates) MultiPolygon

type Point

type Point struct {
	Type        string           `json:"type" bson:"type" map:"type"` //default: Point
	Coordinates PointCoordinates `json:"coordinates" bson:"coordinates" map:"coordinates"`
}

func NewPoint

func NewPoint(coordinates PointCoordinates) Point

type PointCoordinates

type PointCoordinates [2]float64 //[0]Longitude经度, [1]Latitude维度
var NilPointCoordinates PointCoordinates

type Polygon

type Polygon struct {
	Type        string               `json:"type" bson:"type" map:"type"` //default: Polygon
	Coordinates [][]PointCoordinates `json:"coordinates" bson:"coordinates" map:"coordinates"`
}

func NewPolygon

func NewPolygon(coordinates [][]PointCoordinates) Polygon

Jump to

Keyboard shortcuts

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