Greetings to everyone.
I need to rasterize some different cartograms. That means I got some polygons and need to place them on a map and then get image as a result. Different cartograms means different sizes on real map (in meters), but in result I need equal-sized images (in pixels). My idea was to use Raster Properties in MapnikRasterizer by changing Cell Spacing parameter dynamically. For each cartogram I calculate a new Cell Spacing value using Aggregaror -> BoundingReplacer -> BoundsExtractor -> AttributeCreator with some math inside. AttributeCreator add Kmax attribute that contain exactly what I need - how much meters in one pixel and two values for buffer. Then I clip source map (from SASPlanet if you know) using Clipper and 2DBoxReplacer - adding needed buffer to each x and y value at both sides because I need exatly asked width and height no matter of cartogramm geometry. That is my Raster for Mapnik. At this step all is fine - including all calculated values, that was shown in Inspectors with best care.
And of course I send some geometry objects to Mapnik - that is my cartogram polygons.
But problem was when I never expect - well, I am pretty new to FME - MapnikRasterizer send a fatal erro to me because "No values were specified for either both NUM_ROWS and NUM_COLUMNS, or SPACING. One or the other must be specified". If I wrote in CellSpacing something like
@Max(@Value(Kmax),20)
instead of what I really need:
@Value(Kmax)
all is fine with errors but dummy 20 always, never Kmax.
What I doing wrong? Thanks for any help!