[OSM-dev] convert tool

Jon Burgess jburgess777 at googlemail.com
Wed Jun 18 20:29:54 BST 2008


On Wed, 2008-06-18 at 20:31 +0200, Dominik Spies wrote:
> Hi,
> 
> I tried to set up a local slippy map to have instant access to my last 
> changes for me and some folks working on a specfifc county.
> 
> After some stuggle with building osm2pgsql and mapnik, generate_tiles.py 
>   prints the error message: "/bin/sh: convert: not found". I figured out 
> that this tool is in the utils directory in svn, but "apt-get install 
> libmagick9-dev" will install about 100MB binaries, with x11 and so on..
> 
> Ist that neccesary? Can I download an binary version of that tool with 
> smaller footprint?
> What exactly does this tool do?

'convert' is part of ImageMagick. Mapnik normally saves images as 32bit
RGBA format files. The convert tool was used to produce 256 colour tiles
with an indexed palette which are much smaller.

If you don't care about the file size then you can comment out this
line. Also, newer versions of Mapnik have this functionality built in,
try changing the previous line to read:

	view.save(tile_uri,'png256')

The Mapnik 256 colour support is faster than the ImageMagick convert
tool but occasionally produces some non-optimal results. This causes odd
looking tiles in a few places on the main slippy map. For example:

http://openstreetmap.org/?lat=51.51915&lon=-0.16875&zoom=15&layers=B00FT

If you look at roads immediately around Edgware Road tube station you
will see that the white fill colour of the unclassified/residential
roads is replaced with the map background colour.

	Jon






More information about the dev mailing list