I would like to know if it is specifically forbidden for an OSM way to cross the 180th meridian in either direction. And as a corollary to that, when I export data from OpenStreetMap.org is it guaranteed that no way contained in the exported datafile will contain such a crossing? I have discovered various comments and hints in the documentation and forum that indicate problems in different pieces of software with regard to this point, but I have yet to see any authoritative-looking statement that declares whether this is a specifically forbidden condition or not. The docs do seem clear that only values within [-180, +180] are legal node longitudes, but you could certainly have a way containing the legal longitude sequence ... +179.9, +180.0, -179.9, -179.8. Would this be interpreted to cross the 180th meridian in an easterly direction by 0.1 degrees or to span the gap between +180.0 and -179.9 by traveling almost 360 degrees to the west? asked 05 Sep '20, 02:03 rbd808 |
It is not technically forbidden. But most software cannot interpret such ways correctly - e.g. if you draw a building that sits across the dateline, the renderer will instead make your building go around the whole globe. Therefore the community will ask you to refrain from doing it. When processing OSM data it is possible to encounter ways that cross the dateline but you wouldn't know from the data alone that it does (someone might want to draw a globe-spanning building); you can only use heuristics to guess what makes sense. Any dateline-crossing ways will likely be removed quickly by the community. answered 05 Sep '20, 08:29 Frederik Ramm ♦ Thanks, Frederik! I will extrapolate from your response that if I export regional data from the openstreetmap.org database the exported file's ways will not contain 180 crossings. If this is incorrect please advise.
(05 Sep '20, 17:08)
rbd808
It is unlikely for the file to contain such ways, but not impossible; if the file does contain such ways, they are likely to be removed in the next update.
(05 Sep '20, 18:30)
Frederik Ramm ♦
Thanks for the clarification, Frederik!
(05 Sep '20, 19:51)
rbd808
|