QGIS – Deleting Fixed Distance of a Line from a Point on the Line

linepointqgis

I have multiple points on lines in QGIS. Starting at every point I want to delete 50m of the line for each point. The direction does not matter.

If two points are too close the 50m have to delete just once.

enter image description here

My problem is besides how do it, what to do it without touching the lines near by. Therefore buffering is not possible. Also a problem is multiple points are close to each other on the same line.

I though about the unconventional way of creating a 50 m x 1 m polygon and put on the point (ca. 7800…)

How could I do this?

Best Answer

  1. Use network tool: Menu processing > Toolbox > Service Area (from layer). Use the rails as network layer and the points as Vector layer with start points. Set a distance of 25 meters. The tool will find the nearest reailway line of the point and from there create a line along the network of all points within 25 m to both sides (thus 50 m in total).

  2. Apply a very small buffer (like 0.1 meters) around the result.

  3. Run Menu Vector > Geoprocessing tool > Difference with rail as Input layer and the buffer from step 2 as Overlay layer.

And here you are with the result:

Blue point: initial point; black lines: rails; yellow: service area; red: rails with deleted section: enter image description here

Related Question