1

How can I get the (x,y) coordinates of the vertices of a polyline in QGIS?

I do not find the function in the field-calculator

I can find the coordinates for each point, but I am not able to highlight it only for the first and the last point for each polyline. I would like to link those value for each polyline

8
  • Convert the line to points, then use the tool add geometry columns.
    – Erik
    Jul 16, 2021 at 7:55
  • How I can highlight the first and last points for each polyline?
    – Ale
    Jul 16, 2021 at 7:59
  • 3
    start_point($geometry) and end_point($geometry)
    – Babel
    Jul 16, 2021 at 8:02
  • That is a different question.
    – Erik
    Jul 16, 2021 at 8:02
  • 1
    @Babel i think your reference is too complex for this issue
    – Taras
    Jul 16, 2021 at 8:27

1 Answer 1

2

The solution is to use for all the items the function:

  • $y_at (0) and $x_at (0) (coordinates of the first point of the polyline)
  • $y_at (-1) and $x_at (-1) (coordinates of the last point of the polyline)

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.