Documentation ¶
Index ¶
- Constants
- func EarthAngle(dist float64) s1.Angle
- func FilterUids(uids *task.List, values []*task.Value, q *QueryData) *task.List
- func IndexTokens(g *types.Geo) ([]string, error)
- func Intersects(l1 *s2.Loop, l2 *s2.Loop) bool
- func IsGeoFunc(str string) bool
- type Area
- type Length
- type QueryData
- type QueryType
Constants ¶
const ( // MinCellLevel is the smallest cell level (largest cell size) used by indexing MinCellLevel = 5 // Approx 250km x 380km // MaxCellLevel is the largest cell leve (smallest cell size) used by indexing MaxCellLevel = 16 // Approx 120m x 180m // MaxCells is the maximum number of cells to use when indexing regions. MaxCells = 18 )
const EarthRadiusMeters = 1000 * 6371
EarthRadiusMeters is the radius of the earth in meters (in a spherical earth model).
Variables ¶
This section is empty.
Functions ¶
func EarthAngle ¶
EarthAngle converts a to distance on earth in meters to an angle
func FilterUids ¶
FilterUids filters the uids based on the corresponding values and QueryData.
func IndexTokens ¶
IndexTokens returns the tokens to be used in a geospatial index for the given geometry. If the geometry is not supported it returns an error.
func Intersects ¶
Intersects returns true if the two loops intersect.
Types ¶
type Area ¶
type Area float64
Area denotes an area on Earth
type Length ¶
type Length float64
Length denotes a length on Earth
func EarthDistance ¶
EarthDistance converts an angle to distance on earth in meters.
type QueryData ¶
type QueryData struct {
// contains filtered or unexported fields
}
QueryData is internal data used by the geo query filter to additionally filter the geometries.
type QueryType ¶
type QueryType byte
QueryType indicates the type of geo query.
const ( // QueryTypeWithin finds all points that are within the given geometry QueryTypeWithin QueryType = iota // QueryTypeContains finds all polygons that contain the given point QueryTypeContains // QueryTypeIntersects finds all objects that intersect the given geometry QueryTypeIntersects // QueryTypeNear finds all points that are within the given distance from the given point. QueryTypeNear )