Problems getting Tilecache to work with Mapnik


i’m looking for a working tilecache.cfg or an explanation for using Mapnik as an OpenStreetMaps renderer for tilecache.
My problem is:

  • I have Mapnik installed and rendering OSM data fine with and
  • I have tilecache installed and it works fine for caching an external WMS server.
    both are pretty much installed with their stock configuration files ( just adapted to my directory names)
    however, when i try to use tilecache with mapnik in the openlayers demo that comes with tilecache, i get error messages:

An error occurred: can’t find resolution index for 0.703125. Available resolutions are:
[156543.03390000001, 78271.516950000005, 39135.758475000002, 19567.879237500001, 9783.9396187500006, 4891.9698093750003, 2445.9849046875001, 1222.9924523437501, 611.49622617187504, 305.74811308593752, 152.87405654296876, 76.43702827148438, 38.21851413574219, 19.109257067871095, 9.5546285339355475, 4.7773142669677737, 2.3886571334838869, 1.1943285667419434, 0.59716428337097172, 0.29858214168548586]

tried for example with the following image request (left half of the planet), replace hxxp with http:
the same url works fine with LAYERS=basic which uses an external WMS server instead of LAYERS=osm which uses mapnik

the tilecache.cfg configuration section used for the Mapnik layer named “osm” is, stock from tilecache:

if i add the following resolutions line to that section:
the error message changes to:

An error occurred: Current x value -180.000000 is too far from tile corner x -268.340000

what am i doing wrong here, what must i do to get tilecache to work with mapnik?

Ask on the dev mailing list. might get a response there…