[OSM-dev] Detailed Coast display in Mapnik

Jon Burgess jburgess777 at googlemail.com
Wed Aug 15 23:55:00 BST 2007


On Wed, 2007-08-15 at 15:00 +1000, Brent Easton wrote:
> Hi Cameron,
> 
> >Mapnik uses only external data (world_boundaries.tar.bz2, linked to on
> >the wiki) to render coastlines - the stuff you draw in as
> >natural=coastline is ignored completely.  I'm not sure why the data
> >breaks when you zoom in some areas (such as Australia, but people have
> >also complained about it in other countries).
> 
> ?????
> 
> There must be more too it than that.
> 
> Have a look at this area around Plymouth UK:
> 
> http://www.openstreetmap.org/?lat=50.34800311344643&lon=-4.151113641491551&zoom=12&layers=B0F
> 
> and here is a similiar area on the NSW South Coast that I did prior to the last Mapnik update:
> 
> http://www.openstreetmap.org/?lat=-34.702765184192536&lon=150.92087425524562&zoom=12&layers=B0F
> 
> 
> The sea appears blue correctly at zoom 9, but does not appear at higher zoom levels. Someone must have done 'something' to fix the coast display in the UK.
> 

Mapnik uses multiple sources for the coastline data and they change
between zoom levels. The switch you see at 9/10 is between 2 data sets.
I believe the one used at the lowest zooms gives the complete polygons
which allow the sea to be filled but is too inaccurate to be used at
beyond zoom 9. For 10+ a different source is used which is more accurate
but is no longer complete polygons so can not be used for a proper fill
of the sea.

There is a special polygon which covers the southern half of the UK
which Artem manually fixed up to be a complete polygon. 


> Or is it a problem with the coastline data used by Mapnik? I tried to import some of it manually, but it was terrible. I used Lakewalker instead and got a quite good result.

The data you tried to import was probably that used at the lowest zooms.
You probably understand why we don't want to use this at higher zooms or
import it.

I think Artem is the only one that fully understands how Mapnik renders
the coastline currently. I believe he is going to revisit whether we can
derive the proper coastal polygons from the OSM data (when he developed
the present setup 12 months ago the OSM data was too broken and
incomplete).

	Jon







More information about the dev mailing list