geospatial

package module
v0.0.3 Latest Latest
Warning

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

Go to latest
Published: Feb 2, 2024 License: MIT Imports: 9 Imported by: 0

README

geospatial

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GeoBoxcloud added in v0.0.2

func GeoBoxcloud(publickey, Mongostring, dbname string, r *http.Request) string

func GeoCentercloud added in v0.0.2

func GeoCentercloud(publickey, Mongostring, dbname string, r *http.Request) string

func GeoGeometrycloud added in v0.0.2

func GeoGeometrycloud(publickey, Mongostring, dbname string, r *http.Request) string

func GeoIntersectcloud added in v0.0.2

func GeoIntersectcloud(publickey, Mongostring, dbname string, r *http.Request) string

func GeoMaxDistancecloud added in v0.0.2

func GeoMaxDistancecloud(publickey, Mongostring, dbname string, r *http.Request) string

func GeoMinDistancecloud added in v0.0.2

func GeoMinDistancecloud(publickey, Mongostring, dbname string, r *http.Request) string

func GeoNearcloud added in v0.0.3

func GeoNearcloud(publickey, Mongostring, dbname string, r *http.Request) string

func GeoNearspherecloud added in v0.0.2

func GeoNearspherecloud(publickey, Mongostring, dbname string, r *http.Request) string

func GeoWithincloud added in v0.0.2

func GeoWithincloud(publickey, Mongostring, dbname string, r *http.Request) string

Types

type GeoBorder

type GeoBorder struct {
	Type        string        `bson:"type"`
	Coordinates [][][]float64 `bson:"coordinates"`
}

type GeoBoxReq added in v0.0.2

type GeoBoxReq struct {
	LowerLeft  []float64 `json:"lowerLeft" bson:"lowerLeft"`
	LowerRight []float64 `json:"lowerRight" bson:"lowerRight"`
}

type Geometryreq added in v0.0.2

type Geometryreq struct {
	Geometry bson.M `json:"geometry" bson:"geometry"`
}

type LocationData

type LocationData struct {
	ID          string    `bson:"_id"`
	Province    string    `bson:"province"`
	District    string    `bson:"district"`
	SubDistrict string    `bson:"sub_district"`
	Village     string    `bson:"village"`
	Border      GeoBorder `bson:"border"`
}

func GeoBoxQuery

func GeoBoxQuery(client *mongo.Database, lowerLeft, upperRight []float64) ([]LocationData, error)

func GeoCenterQuery

func GeoCenterQuery(client *mongo.Database, center []float64, radius int) ([]LocationData, error)

func GeoGeometryQuery

func GeoGeometryQuery(client *mongo.Database, geometry bson.M) ([]LocationData, error)

func GeoIntersectQuery

func GeoIntersectQuery(client *mongo.Database, polygon [][][]float64) ([]LocationData, error)

func GeoMaxDistanceQuery

func GeoMaxDistanceQuery(client *mongo.Database, point []float64, maxDistance int) ([]LocationData, error)

func GeoMinDistanceQuery

func GeoMinDistanceQuery(client *mongo.Database, point []float64, minDistance int) ([]LocationData, error)

func GeoNearQuery

func GeoNearQuery(client *mongo.Database, polygon [][][]float64, maxDistance int) ([]LocationData, error)

func GeoNearSphereQuery

func GeoNearSphereQuery(client *mongo.Database, polygon []float64, radius int) ([]LocationData, error)

func GeoWithinQuery

func GeoWithinQuery(client *mongo.Database, polygon [][][]float64) ([]LocationData, error)

type Nearspherereq added in v0.0.2

type Nearspherereq struct {
	Radius      int       `bson:"radius" json:"radius"`
	Coordinates []float64 `bson:"coordinates" json:"coordinates"`
}

type RequestGeoIntersects added in v0.0.2

type RequestGeoIntersects struct {
	Coordinates [][][]float64 `bson:"coordinates" json:"coordinates"`
}

Jump to

Keyboard shortcuts

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