Details
-
Improvement
-
Resolution: Done
-
Major - P3
-
None
-
None
Description
See: https://groups.google.com/forum/?fromgroups=#!topic/mongodb-user/D7ZMWdUnR5U
If the x-axis spans more than 180° it is an invalid shape for $geoWithin or $geoIntersects.
For example:
// This is valid:
|
db.features1.find( { loc :
|
{ $geoIntersects :
|
{ $geometry :
|
{ type : "Polygon" , coordinates: [ [ [1, 90], [-179, 90], [-179, -90], [1, -90], [1, 90] ] ] }
|
}
|
}
|
} )
|
// This is invalid (and will silently return no results):
|
db.features1.find( { loc :
|
{ $geoIntersects :
|
{ $geometry :
|
{ type : "Polygon" , coordinates: [ [ [2, 90], [-179, 90], [-179, -90], [2, -90], [2, 90] ] ] }
|
}
|
}
|
} )
|
Attachments
Issue Links
- related to
-
SERVER-9346 Cannot query world with 2dsphere index
-
- Closed
-