Navigation
This version of the manual is no longer supported.

Geospatial Query Operators

On this page

Operators

Query Selectors

Name Description
$geoWithin Selects geometries within a bounding GeoJSON geometry.
$geoIntersects Selects geometries that intersect with a GeoJSON geometry.
$near Returns geospatial objects in proximity to a point.
$nearSphere Returns geospatial objects in proximity to a point on a sphere.

Geometry Specifiers

Name Description
$geometry Specifies a geometry in GeoJSON format to geospatial query operators.
$maxDistance Specifies a distance to limit the results of $near and $nearSphere queries.
$center Specifies a circle using legacy coordinate pairs to $geoWithin queries when using planar geometry.
$centerSphere Specifies a circle using either legacy coordinate pairs or GeoJSON format for $geoWithin queries when using spherical geometry.
$box Specifies a rectangular box using legacy coordinate pairs for $geoWithin queries.
$polygon Specifies a polygon to using legacy coordinate pairs for $geoWithin queries.
$uniqueDocs Modifies a $geoWithin and $near queries to ensure that even if a document matches the query multiple times, the query returns the document once.
←   $where $geoWithin  →