[SERVER-4027] Accept geo points equal to 180 (or specified max) Created: 06/Oct/11 Updated: 11/Jul/16 Resolved: 01/Jun/12 |
|
| Status: | Closed |
| Project: | Core Server |
| Component/s: | Geo |
| Affects Version/s: | None |
| Fix Version/s: | 2.1.2 |
| Type: | Bug | Priority: | Minor - P4 |
| Reporter: | karl seguin | Assignee: | Mathias Stearn |
| Resolution: | Done | Votes: | 6 |
| Labels: | 212push | ||
| Remaining Estimate: | Not Specified | ||
| Time Spent: | Not Specified | ||
| Original Estimate: | Not Specified | ||
| Environment: |
n/a |
||
| Issue Links: |
|
||||||||||||||||
| Backwards Compatibility: | Minor Change | ||||||||||||||||
| Operating System: | ALL | ||||||||||||||||
| Participants: | |||||||||||||||||
| Description |
|
The default geospatial index is -180,180...with the upper bound being exclusive. However, there are a number of locations in the world which seem to reside at 180° 0′ 0″, like: I've seen two popular geo-ip databases fail to easily import into mongodb because of this. |
| Comments |
| Comment by Mathias Stearn [ 01/Jun/12 ] | |||||||||||||
|
Backward breaking if a user depended on lat=180 points being rejected (probably no-one). | |||||||||||||
| Comment by auto [ 01/Jun/12 ] | |||||||||||||
|
Author: {u'login': u'RedBeard0531', u'name': u'Mathias Stearn', u'email': u'mathias@10gen.com'}Message: Support geo indexing with points equal to max (+180 by default) | |||||||||||||
| Comment by Greg Studer [ 25/Jan/12 ] | |||||||||||||
|
The geohash calculation will floor the value of 180 to 0 in the hash, which could lead to that doc being hard to retrieve when the exact document value needs to be tested (near $within/$maxDistance bounds). Better handling of wrapped cases would definitely be helpful here though. | |||||||||||||
| Comment by Jon Hoffman [ 24/Jan/12 ] | |||||||||||||
|
we patched the code to get around this problem:
|