4

Seems like this should be simple, meaning I'm probably "trying to do the wrong thing," but: I have a field (specifically, Label Placement's "Offset X,Y") that expects an input of type double coord. I want to do a data-defined override: pull the X and Y values from columns in the attribute table.

But, how do I return the two values as a single coord pair from the expression builder? Trying [x,y], (x,y), {x,y}, etc. all give a syntax error...

1 Answer 1

6

They must be converted to string in format x,y

You can use

"offset_x" || ',' || "offset_y"

or

format('%1,%2', "offset_x", "offset_y")

where offset_x and offset_y are your offset columns.

0

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.