Skip to main content
3 of 3
added 14 characters in body
Babel
  • 74.9k
  • 15
  • 87
  • 227

Dissolve all lines, then split them at the points. You can do it in 3 simple steps:

  1. Dissolve the layer

  2. At each point, create a small auxiliary line, perpendicular to the initial line. Use Geometry by expression on the point layer with this expression:

     extend(
         make_line (
             $geometry,
             project (
                 $geometry, 
                 1,  -- use a small value
                 radians(
                     90+line_interpolate_angle( 
                         overlay_nearest ('Dissolved',$geometry)[0],
                         line_locate_point (overlay_nearest ('Dissolved',$geometry)[0], $geometry)
                     )))),1,0) -- use a small value
    
  3. Use Split with lines: use the dissolved layer for Input layer and the auxiliary lines from step 2 as Split layer. Now create a new field with the Field calculator expression $id.

Small, auxiliary black lines at each point, used to split the dissolved line: enter image description here

Babel
  • 74.9k
  • 15
  • 87
  • 227