[SERVER-1618] geodb -bbox query coordinates Created: 11/Aug/10 Updated: 12/Jul/16 Resolved: 15/Jun/11 |
|
| Status: | Closed |
| Project: | Core Server |
| Component/s: | None |
| Affects Version/s: | 1.5.0, 1.8.1 |
| Fix Version/s: | 1.9.0 |
| Type: | Bug | Priority: | Major - P3 |
| Reporter: | sima lotfi | Assignee: | Greg Studer |
| Resolution: | Done | Votes: | 0 |
| Labels: | None | ||
| Remaining Estimate: | Not Specified | ||
| Time Spent: | Not Specified | ||
| Original Estimate: | Not Specified | ||
| Operating System: | Linux |
| Participants: |
| Description |
|
im using /mongodb-linux-i686-1.6.0 and pymongo to do some geo-queries like bounding box on points and as it is said here: for instance this query : }}): returns: {u'addr:housenumber': u'420', u'loc': [-117.372889, 33.192777],u'addr:city': u'Oceanside', u'is_in:country': u'United States ofAmerica', u'addr:postcode': u'92054', u'is_in:city': u'Oceanside',u'is_in:country_code': u'US', u'addr:country': u'US', 'is_in:state':u'California', u'source': u'SanGIS Addresses Public Domain (http://www.sangis.org/)', u'id': u'596715001', u'_id':ObjectId('4c62eb6634e1c779b800017c'), u'type': u'Point',u'is_in:state_code': u'CA', u'addr:street': u'S Nevada St'}but this query }}): returns this error: }}): so the bbox coordinates are not lower-left and upper-right. not sure thanks, |
| Comments |
| Comment by Greg Studer [ 13/Jun/11 ] |
|
This may have to do with boundary conditions in 1.8.1 - can you reproduce the results if all your points are within [-178, 178]? In particular, the exact maximum bound can be translated to the minimum bound, which seems like it may be one of the issues here. As far as 90/90.1, can you try setting the "bits" option when creating the index to 32 as a workaround? |
| Comment by Ken Pratt [ 09/Jun/11 ] |
|
Add the following to strange beavior - this time with version 1.8.1 query = { "Placemark.Point.coordinates" : { "$within" : { "$box" : [ [ 172.3265993445506 , 9.18637494622202] , [ 180.0 , 20.3450110477435]]}}} The box does have an area. |
| Comment by Ken Pratt [ 09/Jun/11 ] |
|
I am seeing similar behaviour. The following query should not fail. The 2d index is not specifying a max or min range. It is using the default of (-180,180]. > db.AirTraffic.find({"Placemark.Point.coordinates" : { "$within" : { "$box" : [ [ 90.1 , 9.0] , [ 179.0 , 20.0]]}}}) The point is in range and should not result in an error. If I change the first longitude from 90.1 to 80.1, all is well. The failure seems to be across the 90 boundary - which is lat and is still within the default range. > db.serverBuildInfo() |
| Comment by auto [ 05/Oct/10 ] |
|
Author: {'login': 'astaple', 'name': 'Aaron', 'email': 'aaron@10gen.com'}Message: |
| Comment by Richard Kreuter (Inactive) [ 16/Aug/10 ] |
|
I am not able to reproduce this using mongodb 1.6.0 on a 64bit osx machine. I think this is an old bug that was fixed a number of weeks ago; if you're using a recent build, could you show the output of db.serverBuildInfo()? > db.serverBuildInfo(); ); ); }}); { "_id" : ObjectId("4c62eb6634e1c779b800017c"), "addr:housenumber" : "420", "loc" : [ -117.372889, 33.192777 ], "addr:city" : "Oceanside", "is_in:country" : "United States ofAmerica", "addr:postcode" : "92054", "is_in:city" : "Oceanside", "is_in:country_code" : "US", "addr:country" : "US", "is_in:state" : "California", "source" : "SanGIS Addresses Public Domain (http://www.sangis.org/)", "id" : "596715001", "type" : "Point", "is_in:state_code" : "CA", "addr:street" : "S Nevada St" } |
| Comment by Richard Kreuter (Inactive) [ 11/Aug/10 ] |
|
Could you paste the output of db.serverBuildInfo() at the mongo shell? |