I have multiple bufferstops on railways. I want to cut out 3m (1,5 m in each direction along the rails) of the railway lines with the buffer stop in the middle. Buffering does not work here because, I do not want to touch lines next to each other.
The railway lines may have more than up bufferstop. It is not certain if the bufferstops are exactly on the lines. some bufferstops are not even on the desired railways in red.
I checked with select by expression and overlay disjoint
if the points are really on the lines. Does not look like it (for the yellow ones). I am using OSM data.
How can I do this (something like buffer along a line)?
with the suggested solution below, QGIS is working but not returing the correct lines.
My project and the geopackage with the bufferstops and the rails:
Railwayproject
result:
-Solved-
It is important not to use the suggestionbox in "geometry by expression" but the same name as in the layer. So using the suggestion box does not work for me.
Best Answer
Use QGIS expression with Geometry generator or Geometry by expression. Use this expression on the railway line layer and replace
point
(line 5) with the name of your point (bufferstop) layer:The red line is created based on the black line, but cutting out a distance to both sides of the point: