I am looking for a way to calculate the segment lengths of a line network. I am probably missing just the right vocabulary to search for the best approach, so I guess asking here would be a good idea. I have prepared an image of what I want to achive: Line network with segment lengths

Please note that I am not interested in the length of each line, I know how to calculate that. What I want to calculate is the length between the squares, the intersections that is. Bonus would be to have the lengths towards the end points of a line.

I imagine that pgRouting is able to do that, but I'd prefer a solution without Postgis.

Is this already built into QGIS with the Network analysis library?

I am unsure what to look for.


By processing 'Split Lines with lines, using the same layer enter image description here

  • Nice, thank, you. But that would have a completely dissolved input layer as premise wouldn't it?
    – Frank
    Jun 27 '17 at 18:30
  • 1
    @Frank - No, not necessarily
    – pigreco
    Jun 27 '17 at 18:38
  • 1
    I tried your approach with a "worst case scenario", OpenStreetMap highway data and it did work.
    – Frank
    Jun 29 '17 at 7:11

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.