Skip to main content

Hi,

this time I need to rotate a svg-symbol based on an attributive value. I have set the parameters as

follows:

The parameters in the screenshots for rotation (e.g. 30 degree) and the optional coordinates of the rotation point are hard coded. In the real application they will be filled based on attributes.

Well I get this error:

Invalid Mapnik style configuration. The error was: Failed to parse transform: 'transform="rotate(30,427000,5670000)"

I have tried different Syntax, without success. Do you have any ideas? Maybe the integrated mapnik engine does not support rotation?

You don't need the transform = bit

This works for me


Hi @femo, @egomm is right. Just enter your desired value for the 'transform' attribute (SVG specifications) into the 'Transform' parameter field.

Then, you can also enter a string expression with FME general syntax into the parameter field. For example, if feature attributes called 'angle', 'cx', and 'cy' store the angle and center coordinates for the rotation, you can set this expression to the parameter.

rotate(@Value(angle),@Value(cx),@Value(cy))

Additionally, if 'sx' and 'sy' store the scale factors:

scale(@Value(sx),@Value(sy)) rotate(@Value(angle),@Value(cx),@Value(cy))

If you saved the entire transform attribute value - e.g. 'rotate(30,0,0)' as a feature attribute called 'transform' beforehand, this setting would also be possible.

@Value(transform) 

and so on. Very flexible :-)


Hi @takashi and @egomm,

thanks to your help I have solved the issue already some days ago.

The mapnik rasterizer is really very powerfull!


Reply