[OSM-talk] near longitude 180

andrzej zaborowski balrogg at gmail.com
Thu Feb 19 14:38:55 GMT 2009

2009/2/19 Robert (Jamie) Munro <rjmunro at arjam.net>:
> Hash: SHA1
> Robert Vollmert wrote:
>> Hello,
>> there's some strange coastline data near longitude 180. See eg
>> http://openstreetmap.org/browse/way/24020654
>> I thought I'd ask before trying to fix this, in case I'd flood the
>> world otherwise.
>> I haven't found an editor that works well in this area -- they all
>> seem to think the world ends at ±180 degrees. Here's a challenge:
>> Which editor will be first to support seamless editing all around the
>> world? (Let's leave the poles out for now.)
> The right solution here is to map 0-360 degrees to the unsigned integers
> 0-2^32. When you get an overflow, the right thing happens. It also makes
> the most efficient use of the resolution available.

It doesn't really solve the main problem which is likely that a way
segment connecting two nodes on the opposite sides of 180 deg can be
interpreted as either crossing the meridian 180 or not.  And there
doesn't seem to be a solution to that, other than "duplicating" part
of surface, i.e. allowing nodes so be stored as having longitude of
181 deg or -179 deg.

So the duplicated part should be as narrow as possible, i.e. should
have 0 width, meaning that -180.0 deg would be an allowed longitude as
well as 180.0 deg but not anything < -180 or > 180.  And the editor
should allow easily dragging a node to the 180.0 meridian, instead of
popping up a dialog just before you reach it, like JOSM does.  The
erroneous rendering you can see now is because the nodes are places
slightly left and right of the meridian instead of on it.


More information about the talk mailing list