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

csk
25.4k3 gold badges36 silver badges74 bronze badges
asked Aug 12, 2019 at 6:59
1
  • If you add a textfield to the feature containing something like 20,50 the offset works. 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)
answered Aug 12, 2019 at 7:42
1
  • yes, exactly! Thanks very much! =) Commented Aug 12, 2019 at 7:55

Your Answer

Draft saved
Draft discarded

Sign up or log in

Sign up using Google
Sign up using Email and Password

Post as a guest

Required, but never shown

Post as a guest

Required, but never shown

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

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.