1

I need to dynamically translate points 20 metres from their original point to a suitable cartographic position. I have a rotation value stored in a rotation attribute.

I cannot use this tool right because I cannot give values when using the function cos ("rotation") * 20 or sin ("rotation") * 20

Only number inside ' (single quotation marks) are accepted. How I can use function inside double offset definition?

enter image description here

Sorry about Finnish interface!

enter image description here

  • If you add a textfield to the feature containing something like 20,50 the offset works. – Erik Aug 12 at 7:24
5

You need to transform each number into string representations, and combine those with a comma. Based on your screenshot above, the proper expression would be:

to_string(cos("rotation")*20) || ',' || to_string(sin("rotation")*20)
  • yes, exactly! Thanks very much! =) – Mickeler Aug 12 at 7:55

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.