-
Type: Improvement
-
Resolution: Unresolved
-
Priority: Major - P3
-
None
-
Affects Version/s: None
-
Component/s: Geo, Index Maintenance
-
Query Integration
As documented hereĀ https://docs.mongodb.com/manual/core/2d/ 2d Indexes can not be used to store GeoJSON and for this kind of geometries the correct index should be the 2dsphere.
Trying to load polygons conceived in a plane with a 2dsphere index is possible to receive an error like:
Edges 171 and 221 cross. Edge locations in degrees: [-180.0000000, 85.0511500]-[-180.0000000, 0.0000000] and [-180.0000000, -74.5979195]-[-180.0000000, -85.0511500]
I don't want to discuss the error above, for me is clear. The problem is that there are professional sectors where most of the available geometry resources are "flat" and also the adopted software tools make this assumption.
The error above for example refers to the polygon of a Sentinel dataset provided by the ESA but affects also datasets/geometry provided by NASA, USGS and so on. The provided field of view of this rasters are not wrong but are coordinates mapped on a plane not on a sphere.
Sorry if I went too long. Summarising, what in my opinion should be useful is the support of geoJson also with a 2d index.
Thanks
Damiano