I am adding a number of strings together to create a linestring but as such I need spaces between the initial XY values and the end XY values, plus a comma in between the two halves.
Should result in LINESTRING(97763.88319 434314.9609 , 97620.90369 434175.115) but the space is not recognized like it would be in excel I don't want to make another attribute which only holds a space to then include it as a variable.
This is the expression I used:
concat("LINESTRING(", "X", " ", "Y", " , ", "newX", " " , "newY")
Answer
You need to use single-quote ('
) for hardcoded strings and double-quote ("
) for fields reference:
Try with that:
concat('LINESTRING(', "X", "Y", ' , ' , "new_X", "new_Y", ')')
No comments:
Post a Comment