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...

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.

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.