[COMPASS-5526] Latitude and longitude are reversed on the map in the Schema tab. Created: 20/Feb/22 Updated: 29/Oct/23 Resolved: 22/Feb/22 |
|
| Status: | Closed |
| Project: | Compass |
| Component/s: | Schema |
| Affects Version/s: | None |
| Fix Version/s: | 1.31.0 |
| Type: | Bug | Priority: | Minor - P4 |
| Reporter: | Maksim Simonenko | Assignee: | Anna Henningsen |
| Resolution: | Fixed | Votes: | 0 |
| Labels: | None | ||
| Remaining Estimate: | Not Specified | ||
| Time Spent: | Not Specified | ||
| Original Estimate: | Not Specified | ||
| Environment: |
Ubuntu 20.04 LTS |
||
| Attachments: |
|
| Story Points: | 1 |
| Documentation Changes: | Not Needed |
| Sprint: | Iteration Versailles |
| Description |
| Comments |
| Comment by Githook User [ 25/Feb/22 ] |
|
Author: {'name': 'Anna Henningsen', 'email': 'anna@addaleax.net', 'username': 'addaleax'}Message: fix(compass-schema): unambiguously display lat/long on map GeoJSON (and thus MongoDB) stores coordinates as [Longitude, Latitude], Compass displays the points on the map correctly, but reverses Instead of switching to MongoDB/GeoJSON order, just clearly mark which |
| Comment by Githook User [ 23/Feb/22 ] |
|
Author: {'name': 'Anna Henningsen', 'email': 'anna@addaleax.net', 'username': 'addaleax'}Message: fix(compass-schema): unambiguously display lat/long on map GeoJSON (and thus MongoDB) stores coordinates as [Longitude, Latitude], Compass displays the points on the map correctly, but reverses Instead of switching to MongoDB/GeoJSON order, just clearly mark which |
| Comment by Githook User [ 22/Feb/22 ] |
|
Author: {'name': 'Anna Henningsen', 'email': 'anna@addaleax.net', 'username': 'addaleax'}Message: fix(compass-schema): unambiguously display lat/long on map GeoJSON (and thus MongoDB) stores coordinates as [Longitude, Latitude], Compass displays the points on the map correctly, but reverses Instead of switching to MongoDB/GeoJSON order, just clearly mark which |
| Comment by Githook User [ 22/Feb/22 ] |
|
Author: {'name': 'Anna Henningsen', 'email': 'anna@addaleax.net', 'username': 'addaleax'}Message: fix(compass-schema): unambiguously display lat/long on map GeoJSON (and thus MongoDB) stores coordinates as [Longitude, Latitude], Compass displays the points on the map correctly, but reverses Instead of switching to MongoDB/GeoJSON order, just clearly mark which |
| Comment by Githook User [ 22/Feb/22 ] |
|
Author: {'name': 'Anna Henningsen', 'email': 'anna@addaleax.net', 'username': 'addaleax'}Message: fix(compass-schema): unambiguously display lat/long on map GeoJSON (and thus MongoDB) stores coordinates as [Longitude, Latitude], Compass displays the points on the map correctly, but reverses Instead of switching to MongoDB/GeoJSON order, just clearly mark which |
| Comment by Githook User [ 22/Feb/22 ] |
|
Author: {'name': 'Anna Henningsen', 'email': 'anna@addaleax.net', 'username': 'addaleax'}Message: fix(compass-schema): unambiguously display lat/long on map GeoJSON (and thus MongoDB) stores coordinates as [Longitude, Latitude], Compass displays the points on the map correctly, but reverses Instead of switching to MongoDB/GeoJSON order, just clearly mark which |
| Comment by Githook User [ 22/Feb/22 ] |
|
Author: {'name': 'Anna Henningsen', 'email': 'anna@addaleax.net', 'username': 'addaleax'}Message: fix(compass-schema): unambiguously display lat/long on map GeoJSON (and thus MongoDB) stores coordinates as [Longitude, Latitude], Compass displays the points on the map correctly, but reverses Instead of switching to MongoDB/GeoJSON order, just clearly mark which |
| Comment by Anna Henningsen [ 22/Feb/22 ] |
|
max23sim@gmail.com I also don’t know that, sorry. But I think we still want to modify the display of the coordinates when hovering over the dots, so I’ll leave this ticket open. |
| Comment by Maksim Simonenko [ 22/Feb/22 ] |
|
I double-checked, and It looks like I was wrong. I apologize for wasting time, the issue can be closed. But for me, it is still a secret why MongoDB chose a different format than the usual one. |
| Comment by Anna Henningsen [ 21/Feb/22 ] |
|
max23sim@gmail.com Can you provide a single example of a point that is misplaced, with a screenshot? The Great Pyramid of Giza is located at Lat = 29.979167, Lon = 31.134167. Correspondingly, in MongoDB, this would be entered as [31.134167, 29.979167]: The schema analyzer places this on top of the actual pyramid, perfectly: It’s only that it reverses the coordinates in that display, which it obviously shouldn’t. |
| Comment by Maksim Simonenko [ 21/Feb/22 ] |
|
I checked 3-4 different map services and all have the same behavior as I expected. Also, I checked that I entered the right coordinates in the right place in the DB(just try to store [90, 180] instead of [180, 90] and you will face an error), the problem only with the representation on the schema tab. |
| Comment by Anna Henningsen [ 21/Feb/22 ] |
|
max23sim@gmail.com But Compass does use [longitude, latitude] for placing the point, just not for displaying its coordinates on hover. (Note that e.g. Google Maps uses latitude, longitude order, which is different from what MongoDB expects in its database.) |
| Comment by Maksim Simonenko [ 21/Feb/22 ] |
|
With the 1st part, I agree, with the 2nd no. Point showing in the wrong place on the map because used [latitude, longitude] coordinates instead of [longitude, latitude].
In my opinion it's two related things |
| Comment by Anna Henningsen [ 21/Feb/22 ] |
So, I think the first part is pretty clear, you’re right that this is buggy – the database stores points as [longitude, latitude], and the Compass schema tab displays them as [latitude, longitude] on mouseover. That qualifies as a bug for sure, thank you for bringing this up. The second point is less clear. The points do appear on the right place of the map for me, e.g. a data point that is stored in the database as [-79.9283333, 9.4187222] shows up just off the coast of Panama (as it should) rather than in Antarctica. Are you saying that you’re seeing a different behavior here? |
| Comment by Maksim Simonenko [ 21/Feb/22 ] |
|
Hi Anna, yes, sure. The object was created through Spring Data Repository(MongoDB reactive java driver).
Object in the DB:
Representation on the map in schema tab:
object from mongosh
|
| Comment by Anna Henningsen [ 21/Feb/22 ] |
|
max23sim@gmail.com Can you provide a full reproduction? In particular, how did you create the GeoJsonPoint object? What do the GeoJsonPoint object look like when you query the same collection with mongosh (https://www.mongodb.com/try/download/shell)? |
| Comment by Maksim Simonenko [ 20/Feb/22 ] |
|
Sorry, can't edit the description and submit was by miss click. So, how to reproduce:
|