gq

package
v1.0.4 Latest Latest
Warning

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

Go to latest
Published: Jan 6, 2024 License: MIT Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Box

func Box(mongoconn *mongo.Database, long1 float64, lat1 float64, long2 float64, lat2 float64) (namalokasi string)

func Center

func Center(mongoconn *mongo.Database, long float64, lat float64, radius float64) (namalokasi string)

geoWithin

{
	<location field>: {
	   $geoWithin: { $center: [ [ <x>, <y> ] , <radius> ] }
	}
 }

func CenterSphere

func CenterSphere(mongoconn *mongo.Database, long float64, lat float64, radius float64) (namalokasi string)

func GeoBoxQuery added in v1.0.4

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

func GeoCenterQuery added in v1.0.4

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

func GeoGeometryQuery added in v1.0.4

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

func GeoIntersectQuery added in v1.0.4

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

func GeoIntersects

func GeoIntersects(mongoconn *mongo.Database, long float64, lat float64) (namalokasi string)

func GeoMaxDistanceQuery added in v1.0.4

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

func GeoMinDistanceQuery added in v1.0.4

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

func GeoNearQuery added in v1.0.4

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

func GeoNearSphereQuery added in v1.0.4

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

func GeoWithin

func GeoWithin(mongoconn *mongo.Database, coordinates [][][]float64) (namalokasi string)

func GeoWithinQuery added in v1.0.4

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

func Geometry

func Geometry(mongoconn *mongo.Database, coordinates [][][]float64) (namalokasi string)
$geometry: {
	type: "<GeoJSON object type>",
	coordinates: [ <coordinates> ]
 }

func MaxDistance

func MaxDistance(mongoconn *mongo.Database, long float64, lat float64, maxdistance float64) (namalokasi string)

func MinDistance

func MinDistance(mongoconn *mongo.Database, long float64, lat float64, mindistance float64) (namalokasi string)

func Near

func Near(mongoconn *mongo.Database, long float64, lat float64) (namalokasi string)

func NearSpehere

func NearSpehere(mongoconn *mongo.Database, long float64, lat float64) (namalokasi string)

func Polygon

func Polygon(mongoconn *mongo.Database, coordinates [][][]float64) (namalokasi string)

Types

This section is empty.

Jump to

Keyboard shortcuts

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