2

I have line layer (roads) and point layer (milestones) and I need to create a new line layer based on roads layer, where the start and the end points will be milestone points.

enter image description here

Can you advise me some tool or script to create it?

when I try use in Qgis Split lines at points I get this:

enter image description here

  • 1
    Dissolve -> Split Line at Point. You need to choose QGIS och ArcGIS or your question will probably be put on hold. – BERA Mar 11 at 9:40
  • 1
    In this case I exclude arcgis, beacause I don't have licence for this tool.. – B.Dill Mar 11 at 11:53
  • To tag a question with PyQGIS you should include a code snippet that illustrates what you have tried and where you are stuck. – PolyGeo Mar 11 at 12:20
  • I think there's a bug in the split line at points tool. I used it recently (in QGIS 3.4) and got a similar result, with lines that extended far off the screen. – csk Mar 11 at 17:42
3

I think there's a bug in the split line at points tool. I used it recently (in QGIS 3.4) and got a similar result, with lines that extended far off the screen. I haven't gotten around to making a bug report yet. If you make one, please provide a link in a comment (or edit it into your question, if you don't have the commenting privilege yet).

Here's a workaround using the similar tool, split lines with lines.

  1. Convert your points into short line segments with the geometry by expression tool. Use an expression like this:

     make_line($geometry, translate( $geometry,1,1))
    
  2. Use the SAGA tool split lines with lines -or- the QGIS tool split with lines. Both worked for me, but the QGIS tool was significantly faster.

  • Thank you very much..I'll try it – B.Dill Mar 13 at 7:46

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.