[OSM-talk] the coast and colour of the sea

Jon Burgess jburgess777 at googlemail.com
Wed Oct 31 19:10:12 GMT 2007


On Wed, 2007-10-31 at 19:32 +0100, Martijn van Oosterhout wrote:
> On 10/31/07, David Groom <reviews at pacific-rim.net> wrote:
> > I belive Artem had some tools which took the OSM natural=coastline data and
> > converted this to the files needed for the sea layer in Mapnik.  This is why
> > if you look at an area around
> 
> I could really use such a tool right now, any ideas where I might find
> it? Otherwise I'll probably start writing one...
> 
> Have a nice day,

We don't have such a tool. Personally I'd do it by tweaking osm2pgsql so
that it imports only natural=coastline data into a Postgres table and
then run pgsql2shp to export it as a shapefile. Then there would need to
be some post processing steps to ensure that the ways form into polygons
and the polygons are a reasonable size to be rendered efficiently.

I spoke to Artem about doing this a few months back and he suggested
that the OSM coastline was still not good enough to produce something
significantly better than what we have today.

Another approach which might work better would be to enhance the t at h
scripts which generate the closed coastline polygons and run these
against the planet dump for every z12 tile. Then build a shapefile with
each of these closed z12 tiles (and/or land sea squares). This has the
nice effect that the output should be consistent with the rendering as
seen on the t at h layer and neatly builds a set of polygons which can be
efficiently indexed and rendered.

I really should get around to documenting how Mapnik renders the
coastline on a wiki page. Seems to be a common FAQ.

	Jon








More information about the talk mailing list