[OSM-talk] How to fix wonky coastline?

David Groom reviews at pacific-rim.net
Wed Feb 28 20:49:09 GMT 2007


----- Original Message ----- 
From: "Artem Pavlenko" <artem at pavlenko.uklinux.net>
To: <talk at openstreetmap.org>
Sent: Wednesday, February 28, 2007 8:34 PM
Subject: Re: [OSM-talk] How to fix wonky coastline?


> David,
>
>> As I think I've said before, I think the easiest way deal with coastlines
>> efficiently is to define that the sea is on one specific side. That way
>> renderers can determine where the sea is based on purely the bit of the 
>> way
>> that falls within the area they are trying to render.
>>
>> It would mean correcting coastlines already present.
>>
>> I think it should be possible to do make heuristic decisions about which
>> side is sea presently: for example finding a near (non-bridge) highway to 
>> a
>> coastline way (on the assumption that non-bridge highways are always on 
>> dry
>> land!) and determining which side they are on relative to that bit of 
>> coast
>> (construct a line from one of the highway nodes to one of the nodes of 
>> the
>> coastal way, counting intersections with any coastal ways between -
>> essentially a point in polygon test, eve though it isn't really a 
>> polygon).
>
> This will never work reliably.
>> While this could be done by a renderer it is not very helpful for tiles
>> where the nearest road is a long way off the tile, but it could also be
>> used to automate the correction of coastline direction for ones which are
>> currently against the rule I am proposing, so a one-off task.
>>
>> The renderer merely needs to close up the sea area by adding pseudo
>> segments between the ends of the coastline where they intersect with the
>> edges of the tile (or use the nodes off the edge of the tile) around the
>> tile edges in the direction indicated by the rule.
>>
>> This allows all rendering of sea decisions to take place locally to the
>> tile.
>
> What?? Honestly, are you serious? All we need to do is to use *POLYGONS* ,
> full stop. What is the problem?
>
> Cheers,
> Artem.


Artem

as I understood it, you did some work on this a few weeks back along the 
south coast of the United Kingdom, and I've been regularly looking at the 
mapnik layer in the slippy map to notice a change, but haven't seen one.

a) was there any conclusion you came to about putting the results of your 
work back into the OSM database?

David 






More information about the talk mailing list