You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Thus, we are wrongly "swapping" the place of longitude and latitude.
In order to fix this with minor impact in existing implementations, we should:
A test harness based on the above test that causes CB crashing (I'd recommend to do this first, in a kind of TDD philosophy).
Check that latidudes and longitudes are within ranges in the following places:
In updateContext, when processing the "value" string
In polygon vertex coordinates processing
Storing coordinates in locations.coords in the opposite order upon updateContext processing at mongoDackend
Modify the building query logic for polygons, interchanging the current order in the BSON building
Provide a MongoDB script to interchange the position of the coordinates in locations.coords to be used by users with existing geo-positioned entities in their Orion databases.
Note that considering the above solution, the REST API is not changed, so we minimize the impact in existing users.
The text was updated successfully, but these errors were encountered:
In addition, probably we should review the circle logic, as probably the coordinates to specify the center in the circle should be also swapped in the BSON.
A litte note about what ordering convenion we follow in API and documentation should be added in the User Manual, recognizing the existence of other but citing the references of the one we follow, e.g. Google Eartch, Google Maps (to confirm), etc.
To reproduce the bug: clean database (using MongoDB 2.4.9), start the broker, and sends the following request:
The result is that the broker crashes.
Why? Looking to the mongo logs:
This parsing error is caused because we are breaking the rules for latitude and longitude (remember from school that longitude range is -180 to 180 and latitude ranges is from -90 to 90, see https://answers.yahoo.com/question/index?qid=20071121075230AATuvo3), considering that the format for the coordinates in the query at MongoDb is: (from http://docs.mongodb.org/manual/tutorial/query-a-2dsphere-index/):
Thus, we are wrongly "swapping" the place of longitude and latitude.
In order to fix this with minor impact in existing implementations, we should:
Note that considering the above solution, the REST API is not changed, so we minimize the impact in existing users.
The text was updated successfully, but these errors were encountered: