Hi, > +1 for having an option of generating world files automaticly. > However, I am not sure if your approach would give correct world > files in all cases. I have undestood that Mapnik does not respect > the bounding box or envelope that is given to it if the dimensions of > bbox does not suit the output image size. Frederik Ramm is working on > the same problem when building the Mapnik WMS server.
I have a patch for the Map class here: http://www.remote.org/frederik/tmp/map.patch This does not change the default behaviour but allows you to control what should happen if your bbox and your width/height don't match. You can call map.setAspectFixMode(mode) after creating your map object, where mode is one of + GROW_BBOX, (the default and current behaviour) + GROW_CANVAS, + SHRINK_BBOX, + SHRINK_CANVAS, + ADJUST_BBOX_WIDTH, + ADJUST_BBOX_HEIGHT, + ADJUST_CANVAS_WIDTH, + ADJUST_CANVAS_HEIGHT - so if you want mapnik to return *exactly* the bbox you requested but adjust your width/height as required, you can use GROW_CANVAS. I'm still new to mapnik and I don't know whether changing the canvas size (i.e. the map size in pixels) is allowable at all times or if this might have unwanted side effects when used at a later stage. But for me at least, it works. Bye Frederik _______________________________________________ Mapnik-users mailing list [email protected] https://lists.berlios.de/mailman/listinfo/mapnik-users

