On 31.08.2010 15:18, Iván Sánchez Ortega wrote:
El día Tuesday 31 August 2010 14:42:06, Dražen Odobašić dijo:
does Mapnik support setting rendered map opacity, for instance i would
like to have rendered images with 50% opacity?

Mapnik allows for any symbolizer to have an opacity, plus some compositing
modes (Multiply, Hard Light, etc) for RasterSymbolizer. So for example you
could have a semitransparent raster background with semitransparent lines on
top, and then some opaque labels.

As far as I know, Mapnik will create transparent PNGs if possible (unless you
specify otherwise in the PNG quantization parameters).


Best,

Hi,

im well aware of opacity settings for Symbolizers, but they don't help me much.

Due to heavily corrupted dataset, polygons covering polygons which they shouldn't, and it goes on for 15-20 layers of polygons. Resulting dataset is visually correct, that is, resulting rasterized image is correct, because polygons are stacked in predetermined order.

Problem is i have a request that resulting mapnik raster should be semitransparent, so it could be layered on top of other layers.

Possible solutions:
1. fix corrupted dataset - possibly semiautomatic but it would still take too much time
2. create a script that would add transparency to each rendered raster
3. use mapnik to create transparent raster, without using symbolizer opacity because of need for visually correct image - hacking mapnik so it would allow <Map opacity="0.5" ...>

_______________________________________________
Mapnik-users mailing list
[email protected]
https://lists.berlios.de/mailman/listinfo/mapnik-users

Reply via email to