3

I would like to place label at both the start and the end of a polyline in QGIS. At the moment I'm only able to place a labet either at the start or at the end of my polyline.

I guess I should use the generator geometry

line_substring(reverse($geometry),0,1)
line_substring(($geometry),0,1)

enter image description here How to use those 2 code together?

2 Answers 2

7

You can use rule based labeling.

Create a rule labelling the start point. When done, copy/paste it and instruct to label the end point. In both cases, don't set any filter.

enter image description here

enter image description here

5

You can create a generated geometry as Point / Multipoint type :

collect_geometries(
    start_point($geometry),
    end_point($geometry)
)

Documentation :

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.