[OSM-talk] Coordinates in OSM. Really annoying

Roland Olbricht roland.olbricht at gmx.de
Sun Apr 23 07:29:15 UTC 2017


Hi,

> Is there /really/ any need for *six* coordinate formats? It's hard
> enough to learn a new process without basics like this tripping you up.

There is nobody who is trusted enough to set an universal standard:
https://xkcd.com/927/

Basically, there is an ISO standard
https://en.wikipedia.org/wiki/ISO_6709
to have latitude before longitude. Leaflet complies, OpenLayers does not.

This is for historical reasons. When multiple projections were 
commonplace as exchange formats, then they often used x and y as names 
for the two numbers, and x often decoded to something loosely or tightly 
related to longitude.

However, OpenLayers is too useful to be thrown out just for having the 
wrong coordinate order. The same applies to a lot of other tools with 
legacy coordinate order.

To have a gentle pressure towards the ISO standard, the advertised 
interface is latitude-longitude. There are some precautions for inert 
legacy tools:
http://dev.overpass-api.de/blog/bounding_boxes.html#lonlat_bbox

As Lester has pointed out, XML requires explicit parameter names. By the 
way, I am not aware of anybody actively using the XML syntax. You can 
safely ignore that.

For the delimiter question: There are programming languages with a 
combined market share of almost 90% that agree to have to semanticy in 
whitespace. The sole widespread-used exception is Python. Once again: 
Are you seriously asking the OSM community for a crusade to throw out 
Python for minor syntactic infrigement?

Beside Python, the delimiters are always commas and semi-colons. As 
commas tend to be used to delimit parameters, they are for the numbers 
of the bounding box the delimiters of choice.

Cheers,

Roland




More information about the talk mailing list