Note
Access to this page requires authorization. You can try signing in or changing directories.
Access to this page requires authorization. You can try changing directories.
Geospatial operators perform operations on geographic data and spatial relationships.
| Description | |
|---|---|
$box |
The $box operator defines a rectangular area for geospatial queries using coordinate pairs. |
$center |
The $center operator specifies a circle using legacy coordinate pairs for $geoWithin queries. |
$centerSphere |
The $centerSphere operator specifies a circle using spherical geometry for $geoWithin queries. |
$geoIntersects |
The $geoIntersects operator selects documents whose location field intersects with a specified GeoJSON object. |
$geometry |
The $geometry operator specifies a GeoJSON geometry for geospatial queries. |
$geoWithin |
The $geoWithin operator selects documents whose location field is completely within a specified geometry. |
$maxDistance |
The $maxDistance operator specifies the maximum distance that can exist between two points in a geospatial query. |
$minDistance |
The $minDistance operator specifies the minimum distance that must exist between two points in a geospatial query. |
$near |
The $near operator returns documents with location fields that are near a specified point, sorted by distance. |
$nearSphere |
The $nearSphere operator returns documents whose location fields are near a specified point on a sphere, sorted by distance on a spherical surface. |
$polygon |
The $polygon operator defines a polygon for geospatial queries, allowing you to find locations within an irregular shape. |