I am kind of new to QGIS and now I have a problem with order of the line features.

So first of all, I am creating a point data on a road network. Point data contains points every 100 m on a line. I used Points along geometry tool and it worked just how I wanted except for few roads that I needed to edit. The edit was considering merging lines together so it would contain all of the lines that are part of that particular roadpart in which I used Dissolve tool.

Despite the dissolving the line doesn't order the points how I want them to. The picture below shows the situation. So the 0 m point is middle of the line (the red arrow). And the black arrow shows the end of the dissolved line where I would want to locate the 0 m point.

enter image description here

I have tried to reverse the line directions which turned the point distance order to better but it was still off because the 0 m point was in the other end of the line. I have also tried to digitize the line all over again but the results are the same as I described earlier. I can't use the Join multiple lines plugin to connect lines because there are few disconnects in the line that are meant to be there because there is roundabouts and those are not part of the road. These disconnections are marked as blue lines on a picture above. So these disconnections are part of the reason to my problem.

I have searched answers here for example from this post Points that get created in the wrong order when using e.g. QChainage but it didn't help much.

Is there any solutions that I could try to get the line feature order correct?

  • 3
    are you actually getting a single linestring out or is it a multilinestring consisting of 2 separate linestrings? if the later then your end points don't meet for the union
    – Ian Turton
    Jun 12, 2023 at 13:01
  • It's a multilinestring
    – sarv
    Jun 13, 2023 at 4:39

1 Answer 1


You have a multiline layer: your feature consists of more than one part, two separate lines, both starting from the same point, but going in opposite directions.

On your screenshot, the first part of the line starts at A (blue line = 0) and goes to B (distance 4500 = upper left corner). Then the second line part starts again at A with 4500 (continuing form the end of the first line part) and goes in the opposite direction. This explains the behaviour.

To solve the problem:

  1. explode the line
  2. delete duplicate geometries (if there are any)
  3. then select all features and merge selected features

to get a single part line.

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.