[OSM-talk] How to fix wonky coastline?

Artem Pavlenko artem at pavlenko.uklinux.net
Wed Feb 28 20:34:06 GMT 2007


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.




More information about the talk mailing list