Skip to main content
Solved

MapnikRasterizer:how to rotate a Marker-Symbolizer

  • February 8, 2017
  • 3 replies
  • 51 views

femo
Contributor
Forum|alt.badge.img+6

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

This post is closed to further activity.
It may be an old question, an answered question, an implemented idea, or a notification-only post.
Please check post dates before relying on any information in a question or answer.
For follow-up or related questions, please post a new question or idea.
If there is a genuine update to be made, please contact us and request that the post is reopened.

3 replies

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

You don't need the transform = bit

This works for me


takashi
Celebrity
  • 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!