According to the docs it says about 2d indexes:
The 2d index supports calculations on a flat, Euclidean plane. The 2d index also supports distance-only calculations on a sphere, but for geometric calculations (e.g. $geoWithin) on a sphere, store data as GeoJSON objects and use the 2dsphere index type.
Few things I do not understand..
- I do not understand what is meant by distance-only, does it mean the Chord (that line which connects two surface points through a line "inside" the surface)?
- How does that calculation work against Earth Longitude and Latitude? If that was designed for Euclidean space, how does it express distance in radians?
- Instead, using the 2dsphere indexes, it calculates the surface distance correctly between two points, but it works without specifying the 360 longitude lines and the 180 latitude lines. Is it programmed to specially for Earth longitude and latinudes?
- If 3. above is correct. does it takes into account that Earth is oblate spheroid and not a perfect sphere?