Defines a circle for a geospatial query that uses spherical geometry. The query returns documents that are within the bounds of the circle. You can use the
$centerSphereoperator on both GeoJSON objects and legacy coordinate pairs.
$centerSphere, specify an array that contains:
- The grid coordinates of the circle’s center point, and
- The circle’s radius measured in radians. To calculate radians, see Calculate Distance Using Spherical Geometry.
If you use longitude and latitude, specify longitude first.
Applications can use
$centerSphere without having a geospatial index. However, geospatial indexes support much faster queries than the unindexed equivalents.