MongoDB has built-in support for geospatial data and queries — storing locations (points, areas) and querying by proximity, containment, and intersection. It uses 2dsphere indexes and GeoJSON, powering features like "find places near me" without a separate geospatial database.
Storing location data (GeoJSON)
db..({
: ,
: { : , : [-, ] }
});
db..({ : });
