-
Type: Improvement
-
Resolution: Duplicate
-
Priority: Major - P3
-
None
-
Affects Version/s: None
-
Component/s: Querying
-
None
Geospatial indexing, and querying those data assumes that a surface is Cartesian surface (flat). This is not the case with the Earth. Treating geographical coordinates as Cartesian coordinates, leads to obvious errors.
I believe $center and $box queries could possibly be "fixed" by most people by upcoming search within polygon SERVER-772, but obviously this won't fix $near results errors.
It is very desired that there is some kind of specifying that geospatial index should work with sphere, not flat surface.
Maybe a way to do it from user's point of view would be:
db.places.create_index(
{location: ["2d", 6500]})
Specifying radius of sphere this way would make sense for people who want to use different units than kilometers, or map things on different surfaces (Mars, anyone?).