Skip to main content
Question

MapnikRasterizer does not adhere Opacity setting

  • November 11, 2025
  • 4 replies
  • 47 views

tb09114
Supporter
Forum|alt.badge.img+27

I am creating some PNGs from my analysis and until recently the MapnikRasterizer has been creating transparency according to the opacity setting for my polygons.

I did not touch the MapnikRasterizer, but the results do not show any transparency anymore.
Below a screenshot of the settings I made and the opacity setting is the same for all polygons, yet there is no transparency to see in the resulting PMGs.
 

Is there anything where you see something problematic, that might prohibit transperancy?

4 replies

j.botterill
Influencer
Forum|alt.badge.img+53
  • Influencer
  • November 11, 2025

Does the input or output raster from this transformer, upon inspecting it with Feature/Record Information have an Alpha band?

 

In FME, an alpha band is a fourth band in a raster image that controls transparency, with a value of '0' representing full transparency and '255' (or the maximum value for the data type) representing full opacity. You can inspect the alpha band's values in the FME Data Inspector's Feature Information pane and manipulate it using transformers like the RasterBandAdder to add transparency, or the RasterInterpretationCoercer to set a new alpha band from nodata values. 


tb09114
Supporter
Forum|alt.badge.img+27
  • Author
  • Supporter
  • November 11, 2025

Yes, the results do have an alpha band, but despite the opacity setting of 0.6 the alpha-value is in all cases 255. That is the first issue. The next one is that I cannot just manipulate the alpha-value because 
it depends on 11 different rendering rules (set in the MapnikRasterizer) what has to have transperancy and what not.

The way I understand the RasterInterpretationCoercer the changes will be applied to the whole image.
 

 


carlm
Contributor
Forum|alt.badge.img+16
  • Contributor
  • November 11, 2025

You could use the RasterExpressionEvaluator to recreate your conditions on the alpha band from the MapnikRasterizer. It will recalculate all the pixels independently.


tb09114
Supporter
Forum|alt.badge.img+27
  • Author
  • Supporter
  • November 12, 2025

In the end it was, as usual, an error 40…
There came a multitude of features into the MapnikRasterizer, stacking up on top of each other and it seems that basically canceled out the transparency.
We adjusted the input back to proper counts, and voila. transparency is back. 😍