4

Is is possible to grow a buffer around a feature, except where another feature stops the expansion using QGIS?

There is an existing similar question for ArcGIS Desktop: Buffering with physical barrier using ArcGIS Desktop?

My concrete task is finding cycleways suitable for children, where one criterium is "not dangerously close to major road". I can do this with a buffer around major roads, and removing cycleways within this buffer. However, if some suitable barrier exists, I would like the buffer/"danger zone" to stop there.

Simply making another buffer around the barrier and subtracting from the "danger zone" buffer around the road won't do, as that could also erroneously remove cycleways on the "dangerous" size of the barrier from the "danger zone". I was thinking of somehow finding which is the "safe side" of a barrier, and make a "safe zone" feature from that to cut from the "danger zone" buffer.

enter image description here

  • 2
    Welcome to GIS SE. Please take the Tour, which emphasizes the importance of asking One question per Question. Two software packages in one question is still two questions. Ironically, the answer is likely to be exactly the same as the ArcGIS solution -- Do the buffer, then overlay with the exclusion areas and remove the overlaps -- just with completely different commands. – Vince Jan 19 at 2:39
  • If you also wish to ask how to do this using PostGIS then please do that in a separate question, and show what you have tried with that so far. – PolyGeo Jan 19 at 4:53
4

In QGIS you can do that combining buffer (for highway layer), single sided buffer (for fence layer) and difference (by using both buffers) methods from Processing Toolbox. I tried out my approach with layers of following image where buffer of highway layer has 10 m in EPSG:32612 projection.

enter image description here

In following image it can be observed single sided buffer of fence layer with parameters visualized in dialog of this tool.

enter image description here

Obtained both buffers, Difference method is run with Buffer as input layer and Buffer one side as overlay layer. After unmark buffers layers, result (as expected) is observed in following image: buffer around feature except where barrier (fence) prevents.

enter image description here

| improve this answer | |
  • 1
    Thanks, that looks promising! But can you programmatically determine which side to use for the single-side buffer? I Imagine there may be some complex situations. (I am doing this for a city-size network, so manual work for each case is preferred to be avoided) – pereric Jan 19 at 9:34
  • 1
    Yes, it can be done programmatically but, it is another question tagged with python or pyqgis. – xunilk Jan 19 at 16:05

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.