[OSM-dev] bad pngs from mod_tile / renderd & meta files

Jon Burgess jburgess777 at googlemail.com
Fri May 1 19:25:36 BST 2009


On Fri, 2009-05-01 at 10:59 -0700, jburns wrote:
> Hi,
> 
> I am having a problem in that the pngs being generated and returned by my
> apache & renderd & mapnik process are not "proper" pngs in that they are
> rejected by various file viewers as being malformed.
> 
> I have compiled, built and run renderd against the latest mapnik svn. I have
> configured apache and renderd  gets invoked correctly to generate the meta
> files. Typical renderd output is:
> 
> from the request: http://10.0.1.198/osm_tiles2/1/0/0.png
> 
> I see the renderd output:
> 
> Render fd(6) xml(Default), z(1), x(0), y(0)
> META TILE 1 0-1 0-1
> DONE TILE Default 1 0-1 0-1
> Produced .meta: /var/lib/mod_tile/Default/1/0/0/0/0/0.meta
> 
> Furthermore, my postgres is being queried properly. Running
> generate_image.py (ie, testing mapnik / osm.xml) works and produces
> beautiful pngs.
> 
> Any ideas or tips where to start debugging this one?

Are you trying to use the .meta file as a png or the file returned via
the URL? 

The .meta file is an archive of 64 individual tile pngs you will need to
unpack them using the "convert_meta" utility if you want to access them
directly. This utility needed a minor update to add support for the
multiple layers which I just added to SVN so do an update before you try
to use it.

$ ./convert_meta -u
Converting tiles in layer Default
Produced tile: /var/lib/mod_tile/Default/5/0/0/0/0/128.png
Produced tile: /var/lib/mod_tile/Default/5/0/0/0/0/129.png
Produced tile: /var/lib/mod_tile/Default/5/0/0/0/0/130.png
Produced tile: /var/lib/mod_tile/Default/5/0/0/0/0/131.png
Produced tile: /var/lib/mod_tile/Default/5/0/0/0/0/132.png
Produced tile: /var/lib/mod_tile/Default/5/0/0/0/0/133.png
...

These png files should be valid:
$ file /var/lib/mod_tile/Default/5/0/0/0/0/131.png
/var/lib/mod_tile/Default/5/0/0/0/0/131.png: PNG image, 256 x 256, 8-bit colormap, non-interlaced
$ file /var/lib/mod_tile/Default/14/0/17/245/184/119.png
/var/lib/mod_tile/Default/14/0/17/245/184/119.png: PNG image, 256 x 256, 1-bit colormap, non-interlaced

	Jon






More information about the dev mailing list