Skip to main content
Solved

MapnikRasterizer:how to rotate a Marker-Symbolizer


femo
Contributor
Forum|alt.badge.img+6
  • Contributor

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?

Best answer by ebygomm

You don't need the transform = bit

This works for me

View original
Did this help you find an answer to your question?

3 replies

ebygomm
Influencer
Forum|alt.badge.img+39
  • Influencer
  • Best Answer
  • February 8, 2017

You don't need the transform = bit

This works for me


takashi
Evangelist
  • February 9, 2017

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 :-)


femo
Contributor
Forum|alt.badge.img+6
  • Author
  • Contributor
  • February 16, 2017

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


Cookie policy

We use cookies to enhance and personalize your experience. If you accept you agree to our full cookie policy. Learn more about our cookies.

 
Cookie settings