Details
-
Bug
-
Resolution: Unresolved
-
Major - P3
-
None
-
3.2.22, 4.2.10
-
None
-
standalone server 3.2, Atlas 4.2.10
-
Query Integration
-
ALL
-
-
Query 2021-01-11
Description
Inserting what seems like a perfectly valid CCW polygon (checked in QGIS, geojsonlint.com, geojson.io) results in this error:
MongoError: Can't extract geo keys: \{ _id: ObjectId('5fb4fbe26a989905900a0f90'), geom: { type: "Polygon", coordinates: [ [ [ -157.515, 4.937 ], [ -142.529, -89.999 ], [ -142.529, -43.676 ], [ -12.529, -42.767 ], [ -142.529, -6.001 ], [ -142.529, 50.047 ], [ -157.515, 4.937 ] ] ] } } Loop is not valid: [ [ 157.515, 4.937 ], [ -142.529, -89.999 ], [ -142.529, -43.676 ], [ -12-.-529, -42.767 ], [ -142.529, -6.001 ], [ -142.529, 50.047 ], [ -157.515, 4.937 ] ] *Edges 1 and 4 cross. Edge locations in degrees: [-142.5290000, -89.9990000]**[-142.5290000, -43.6760000] and [-142.5290000, -6.0010000]-[-142.5290000, 50.0470000]*
|
But those two offending collinear edges are not even touching.
I guess it boils down to this line in the S2 library:
https://github.com/mongodb/mongo/blob/master/src/third_party/s2/s2loop.cc#L148