I just started learning QGIS and PyQGIS. I have one layer of a shapefile that contains a road network (image 1) and one layer of the CSV file (image 2) that contains several start and end points for certain roads within the road network.

How do I get the route from start to end points using the existing road network shapefile?

Unfortunately, those two layers come from different sources, so they don't share the same id or road name. I think the only way to connect those layers is by coordinating location.

Image 1

Image 2

  • There is a module called « split lines at points ».
    – katagena
    Oct 8, 2022 at 7:45

1 Answer 1


But if you need to have distance from start to end, in reference to roads, you need to use a specific plugin for that: LRS It does exactly what you need!

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.