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

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

1 Answer 1

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)
1
  • yes, exactly! Thanks very much! =)
    – Mickeler
    Commented Aug 12, 2019 at 7:55

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

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