geospatials

package module
v0.1.7 Latest Latest
Warning

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

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

README

geospatials

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GeoBoxcloud added in v0.0.3

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

func GeoCentercloud added in v0.0.3

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

func GeoGeometrycloud added in v0.0.3

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

func GeoIntersectcloud added in v0.0.3

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

func GeoMaxDistancecloud added in v0.0.3

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

func GeoMinDistancecloud added in v0.0.3

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

func GeoNearcloud added in v0.0.4

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

func GeoNearspherecloud added in v0.0.3

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

func GeoPolygoncloud added in v0.1.4

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

func GeoWithincloud added in v0.0.3

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

Types

type FullGeoJson added in v0.1.0

type FullGeoJson struct {
	ID         primitive.ObjectID `json:"_id,omitempty" bson:"_id,omitempty"`
	Type       string             `json:"type" bson:"type"`
	Properties Properties         `json:"properties" bson:"properties"`
	Geometry   Geometry           `json:"geometry" bson:"geometry"`
}

func GeoBoxQuery

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

func GeoCenterQuery

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

func GeoGeometryQuery

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

func GeoIntersectQuery

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

func GeoMaxDistanceQuery

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

func GeoMinDistanceQuery

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

func GeoNearQuery

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

func GeoNearSphereQuery

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

func GeoPolygonQuery added in v0.1.4

func GeoPolygonQuery(client *mongo.Database, polygon [][]float64) ([]FullGeoJson, error)

Define the function for GeoPolygon query

func GeoWithinQuery

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

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 GeoFeature added in v0.1.0

type GeoFeature struct {
	ID         primitive.ObjectID `json:"_id" bson:"_id"`
	Type       string             `json:"type" bson:"type"`
	Geometry   GeoPolygon         `json:"geometry" bson:"geometry"`
	Properties Name               `json:"properties" bson:"properties"`
}

type GeoJson added in v0.1.0

type GeoJson struct {
	Type       string     `json:"type" bson:"type"`
	Properties Properties `json:"properties" bson:"properties"`
	Geometry   Geometry   `json:"geometry" bson:"geometry"`
}

type GeoPoint added in v0.1.0

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

type GeoPolygon added in v0.1.0

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

type GeoPolygonReq added in v0.1.4

type GeoPolygonReq struct {
	Polygon [][]float64 `json:"polygon" bson:"polygon"`
}

type Geometry added in v0.1.0

type Geometry struct {
	Coordinates interface{} `json:"coordinates" bson:"coordinates"`
	Type        string      `json:"type" bson:"type"`
}

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"`
}

type Name added in v0.1.0

type Name struct {
	Name string `bson:"name" json:"name"`
}

type Nearspherereq added in v0.0.2

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

type Properties added in v0.1.0

type Properties struct {
	Name string `json:"name" bson:"name"`
}

type RequestGeoIntersects added in v0.0.2

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

type RequestGeonear added in v0.0.7

type RequestGeonear struct {
	Coordinates []float64 `bson:"coordinates" json:"coordinates"`
	MinDistance float64   `bson:"minDistance" json:"minDistance"`
	MaxDistance float64   `bson:"maxDistance" json:"maxDistance"`
}

Jump to

Keyboard shortcuts

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