1

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?

1
  • Could you provide some sample data for the problem to see topology, geometry types etc? What treshold do you consider for points to be too close to each other?
    – NielsFlohr
    Commented Sep 12, 2022 at 10:13

1 Answer 1

1
  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

3
  • does works with multiple points on line too? Or does it have to be just one per line?
    – BAE_23
    Commented Oct 6, 2022 at 20:52
  • Yes, works for multiple points
    – Babel
    Commented Oct 7, 2022 at 5:23
  • works fine, thanks a lot!
    – BAE_23
    Commented Oct 7, 2022 at 11:32

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.