thanks for the infos. I found now a way to create a prerendered cache with http://svn.openstreetmap.org/applications/rendering/mapnik/generate_tiles.py this script . I'm wondering why there is a convert command instead of directly generating png256: convert -colors 255. I deleted the convert command and changed PNG to PNG256. The script is running very fast (about 1500 tiles/minute). I used the boundingbox "Muenchen+" and level 13 to 17. Unfortunately, the PNGs have no normal transparency and no alpha-transparency (My map is a hybrid map which uses both).
Then I have installed ImageMagick and I changed the script back to use the convert command. The script is running less fast (425 tiles/minute). I also get some errors: "convert: Invalid bit depth for RGBA image". I will test now some other external tools to get my desired paletted RGBA images. Do you made tests with http://pngnq.sourceforge.net/ pngnq ? Is it right, that the PNG256 format in Mapnik doesn't support transparency? Is this probably possible in a future version? I'm not a programmer, so perhaps I missed something? cheers Jürgen Dane Springmeyer wrote: > > Jürgen, > > I concur with Chris that it seems like you are mixing up what > TileCache is handling and what is possible with your custom python > scripts. > > If you are using TileCache with a configuration to read from a mapnik > xml like: > > [world] > type=Mapnik > mapfile=/path/to/mapfile.xml > > Then, no, png256 support is not supported. Png256 ( or paletted 8-bit > png's) are also not yet supported in the mapnik OGCServer, but I agree > that they are the idea format to use since they look nearly the same > as 32 bit png at roughly half the size. > > But if you are accessing mapnik natively via the python bindings then > yes, something like: > >>> render_to_file(m, map_output,'png256') > > should work great to create smaller png's. > > You can also do render_to_file(m, map_output,'jpeg') > > If you want to render with the Cairo backend then see some examples > here: > http://trac.mapnik.org/wiki/MapnikRenderers > http://mapnik-utils.googlecode.com/svn/trunk/tutorials/cairo_renderer/ > > Dane > > > On Oct 17, 2008, at 4:29 AM, Christopher Schmidt wrote: > >> On Fri, Oct 17, 2008 at 04:07:16AM -0700, spillocaster wrote: >>> >>> Hi list, >>> >>> I have defined a very nice map with MapNik, which I provide with >>> TileCache. >>> I used a XML-configuration (based on the >>> http://trac.mapnik.org/wiki/XMLGettingStarted XMLGettingStarted- >>> Tutorial ). >>> >>> Now I want to change the output format to a paletted PNG with alpha >>> transparency using the 'PNG256'-parameter. The filesize of the >>> 32bit PNG is >>> a bit too big. Where do I have to define it? In the python script, >>> in the >>> XML or in TileCache? >> >> In TileCache; and the answer to "What should I change" is "You can't": >> TileCache doesn't have support for this at this time. (Or rather, >> "You'd >> need to write a patch.") >> >>> I tried this: >>> >>> render_to_file(m, map_output,'png256') >>> >>> and I added this: >>> >>> m.save('test.png','png256') >>> >>> to the python script, but no success. >> >> It's note clear to me what Python script you're changing that you >> think >> will have an effect on TileCache... >> >>> Is it also possible to switch the >>> renderer from AGG to CAIRO? I also want to experiment with the >>> vector output >>> formats. >> >> Not within TileCache... >> >> Regards, >> -- >> Christopher Schmidt >> MetaCarta >> _______________________________________________ >> Mapnik-users mailing list >> [email protected] >> https://lists.berlios.de/mailman/listinfo/mapnik-users > > _______________________________________________ > Mapnik-users mailing list > [email protected] > https://lists.berlios.de/mailman/listinfo/mapnik-users > > -- View this message in context: http://www.nabble.com/Output-Format-tp20031253p20068009.html Sent from the Mapnik - Users mailing list archive at Nabble.com. _______________________________________________ Mapnik-users mailing list [email protected] https://lists.berlios.de/mailman/listinfo/mapnik-users

