[OSM-dev] Mapnik instructions updated to spherical mercator and new coastlines

Jon Burgess jburgess777 at googlemail.com
Sun Feb 17 21:16:45 GMT 2008

Today I've updated the Wiki and files in SVN to move over to using the
Spherical Mercator projection in Mapnik. 

- I've updated the instructions on how to import the new coastline
- There are some new world_boundaries shapefiles to work with the
spherical projection and removed the redundant coastline information.

More details on how to download and import this new data see:

For those that are using Mapnik today you'll need to:-
- Update to a version of osm2pgsql which supports the "-m" option
- Import your OSM data using "-m"
- Download the new word_boundaries-spherical.tgz file
- Download the coastline polygon shapefile* and import it
- Update to the new versions of osm.xml / osm-template.xml
- Update to the new generate_tiles.py / generate_image.py

I've updated the tools I'm aware of but I've probably missed some. If
you've got any other tools which are trying to project to/from the
Mapnik projection then you'll generally have to change a projection
string like

 +proj=merc +datum=WGS84


 +proj=merc +a=6378137 +b=6378137 +lat_ts=0.0 +lon_0=0.0 +x_0=0.0 +y_0=0 +k=1.0 +units=m +nadgrids=@null +no_defs +over

The reason this change is that the older projection string gave the
wrong answers in some cases. All of the Mapnik tools tended to generate
the same wrong answers consistently and overall the error was cancelled
out. The larger meta tiles in mod_tile made these small errors cause
visible problems on the map.


* The coastline polygons available are probably broken right now due to
some issues with the Hypercube machine over the past few days. You may
be better off waiting a few days and checking the coastline viewer
before downloading them.

More information about the dev mailing list