-
Type: Improvement
-
Resolution: Duplicate
-
Priority: Major - P3
-
None
-
Affects Version/s: 4.3.6
-
Component/s: Geo
-
None
i enter a single entry to mongo, with Polygon which contains most of the earth:
db.test.insert( { loc : { type : "Polygon" , coordinates : [ [[-179, -90],[180, -90],[180, 90],[-179, 90],[-179, -90]]] } })
then, when i query for a Point to get the Polygon(s) who contains it:
db.getCollection('test').find({ loc: { $geoIntersects: { $geometry: { type: "Point" , coordinates: [0,0] }}}})
i do not get any result. this is because mongo searches in the small part and not in the big one. if i query for a Point which is in the small section, i do get the result:
db.getCollection('test').find({ loc: { $geoIntersects: { $geometry: { type: "Point" , coordinates: [-179.5,0] }}}})
CRS can help me ONLY if i query for a Polygon. but in my case, I query for a Point.
I suggest to support CRS upon insertions of Polygons.
- duplicates
-
SERVER-45189 Allow strictwinding property also for inserted geometries ( or support geojson standard rfc7946)
- Backlog