[SERVER-14590] GeoQuery with BBOX near borders doesn't work Created: 17/Jul/14 Updated: 24/Jan/15 Resolved: 23/Jan/15 |
|
| Status: | Closed |
| Project: | Core Server |
| Component/s: | Geo |
| Affects Version/s: | 2.6.3 |
| Fix Version/s: | None |
| Type: | Bug | Priority: | Major - P3 |
| Reporter: | Michael Quacinella [X] | Assignee: | Thomas Rueckstiess |
| Resolution: | Incomplete | Votes: | 0 |
| Labels: | None | ||
| Remaining Estimate: | Not Specified | ||
| Time Spent: | Not Specified | ||
| Original Estimate: | Not Specified | ||
| Environment: |
Ubuntu 14.04 , Mongo 2.6.3 |
||
| Operating System: | Linux | ||||||||||
| Steps To Reproduce: | 1) create 2dsphere index (mine is a composite index, I didn't try with simple 2dsphere)
5) compare it with db.mycoll.find().count() |
||||||||||
| Participants: |
| Description |
|
If you try to find docs inside sphere limits (|x|<=179.9, |y|<89.9 as documentation says) you won't get expected results. Indexs:
One of my geoJSON docs:
|
| Comments |
| Comment by Ramon Fernandez Marina [ 07/Nov/14 ] | ||||||||||||||||||||
|
MikeQuaci, we haven't heard back from you for a while. If this is still an issue for you, can you please review Thomas' question above and provide the additional information he requested? Thanks, | ||||||||||||||||||||
| Comment by Thomas Rueckstiess [ 24/Jul/14 ] | ||||||||||||||||||||
|
Hi Michael, I'm sorry, but I am not sure I understand what the issue is. Are you expecting more results back than you get? Please note that this is a 2dsphere index, so your queries are on a spherical surface. The lines are not straight but geodesics, therefore you won't get back exactly the grid objects as you would on a flat surface. If this is what you need, you can use a "2d" index instead of "2dsphere". If this is not the issue you're describing, can you please add another example of what you expect and what you get back? You can also attach a drawing / sketch to the ticket (More - Attach File) if you have something handy. Thanks, | ||||||||||||||||||||
| Comment by Michael Quacinella [X] [ 18/Jul/14 ] | ||||||||||||||||||||
|
Hi Thomas, Yes, 1) is a writing error. Sorry. I just reproduced the bug with this bbox: It's all north hemisphere, and lines are shorter than 180 degrees. If you need more details ask me everything you need, | ||||||||||||||||||||
| Comment by Thomas Rueckstiess [ 17/Jul/14 ] | ||||||||||||||||||||
|
Hi Michael, There are a few issues with your example.
Are you able to reproduce the problem in a small area of the world that doesn't span more than 1 hemisphere? Regards, | ||||||||||||||||||||
| Comment by Michael Quacinella [X] [ 17/Jul/14 ] | ||||||||||||||||||||
|
There is an error in step 2, this would explain better the grid for testing:
|