Skip to main content
1 of 4
Babel
  • 80.4k
  • 15
  • 97
  • 245

Extract the vertices of the line and than delete all the vertices that are very close to one of the points. Than re-connect remaining vertices to a line again.

Your line layer needs a field with a unique field, in my case id. Layer names: lines (black line on the screenshot below) and points (red dots). Change all these names accordingly.

How you do it:

  1. Menu Vector / Geometry tools / Extract vertices: white dots

  2. On the resulting layer from one, select features using the toolbar icon select by expression with this expression. It looks for the nearest feature from the layer points and if the distance is smaller than 0.1, it is selected (in fact, distance should be 0 - but to be sure in case of rounding errors, set a minimal distance):

distance ( $geometry, array_first ( overlay_nearest( 'points', $geometry ) ) ) <0.1 
  1. Delete the selected points (yellow in the screenshot).

  2. Menu Processing / Toolbox / Points to Path to re-connect the remaining points: for sorting, select the field vertex_index, for grouping select id. You get the blue line, corresponding to the original, black line, minus the vertexes where your have red dots.

enter image description here

The result looks like this. Be aware that the topology changes: on the T shape at the right, be deleting the vertex where both lines meet, being in the same time the start point of the vertical line, you loose the first segment and thus, the two lines are no longer connected:

enter image description here

Babel
  • 80.4k
  • 15
  • 97
  • 245