I have created a series of buffer regions around line segments in QGIS (in my case a road network):

enter image description here

The buffers are in transparent blue with the darker circles being where the buffer segments overlap. Additionally, the red outline shows the shape of a single buffer polygon.

I'm trying to remove the areas in my map where these buffers intersect. Specifically, I would like a layer composed of all of the non-overlapped polygons, and to keep their attributes (in my picture above it would be all of the lighter-blue polygons). Most of the geoprocessing tools need two separate layers. Also, while the Topology Checker can identify the overlapping areas in the same layer, it cannot select them.

Is there a straightforward in QGIS or GRASS that can remove the overlapping areas of buffer polygons in the same layer?


Following Kazuhito's response, I ran the Union command in QGIS 3.2, but it did not produce the desired output:

enter image description here

From from Union changelog, it should be that union "splits off" this overlapped area from the original buffer polygon. Thus the highlighted intersection should only have 2 polygons (the overlaps for each layer), but instead it has 4 because it retains the original polygon as well. Does anyone know why the Union command would not produce a split up polygon as illustrated in the changelog?

  • Do you want to keep the attributes of the line in the buffer? Or are you happy to just have a single polygon representing the buffer? If you happy to keep it all as one feature, then try running the dissolve tool on the buffered layer to remove all overlaps. – Keagan Allan Sep 18 '18 at 2:09
  • I'm not looking for a single polygon. Rather, I would like a layer of all non-overlapped buffer polygons. – Obie K Sep 18 '18 at 2:24
  • OK cool, could you please edit the question to include this requirement. Perhaps a picture of how you would like the final layer to look? As in how would you like to handle those areas that overlap...do you want them deleted / merged with the other polygons? – Keagan Allan Sep 18 '18 at 3:21
  • 1
    addressing your update: don't select a Union layer in the Union dialog, just the Input layer. – ThingumaBob Sep 19 '18 at 11:42
  • If I run it with only the input layer, I receive an error: "GEOS geoprocessing error: intersection failed. TopologyException: side location conflict at 394470.21044322092 4656103.7801100314 Execution failed after 1.84 seconds". I'm not entirely sure how to resolve this error. Is there some sort of "force" option to have it run anyway? – Obie K Sep 19 '18 at 11:52

QGIS 3.2

  1. Union (in Processing Toolbox | Vector overlay), then
  2. Delete duplicate geometries (in Processing Toolbox | Delete duplicate geometries).

For information how this new Union algorithm works, visit Changelog for QGIS 3.2.

  • The link you sent about the new Union command looks like it should work, however, when I union my buffer polygon layer against itself in QGIS 3.2 it doesn't appear to produce the same output as shown in the Changelog figure (please see update in my original post). – Obie K Sep 19 '18 at 11:05
  • Thank you for the elegant solution! After dropping a problematic polygon and switching to rectangular buffers, everything worked out. – Obie K Sep 19 '18 at 12:36

QGIS 3.2:

For the sole purpose of visualization, consider the use of Symbol levels and a two layered road symbol having the width of your buffer. Use your buffers (possibly with the Union / Delete duplicates procedure applied, as pointed out by @Kazuhito) for spatial analysis separately.

Assuming you want a buffer of 25 meter (in both directions, i.e. 50 meter in total):

  • duplicate your road layer if needed (to keep the red road line underneath) and open the Symbology tab. To match your blueish transparent style with a darker border:

    • use a darker blue and set width to 50 meter (max. buffer width; make sure you choose Meters at Scale) and, for a smoother line, choose Join style | Round; this will generate the border in the final visualization:

      ![enter image description here

    • add a second Symbol layer (hit the green + below the top panel) and apply a lighter blue as color. Set the Stroke width to, say, 45 meter, with the same options as above:

      enter image description here

    • click on the Line symbol layer group in the top panel and open Advanced | Symbol levels...; in the follow up window, assign the drawing order of your Symbol levels (Note: Layer 0 refers to the first Symbol layer that was present, which is, per default, the downmost Simple line layer in the panel); a lower number will be drawn in an earlier drawing pass:

      enter image description here

      enter image description here

    • ...and apply an opacity level of, say, 30% to the whole Symbol layer group:

      enter image description here

  • enjoy, possibly having a beer

Why does this do what it does?

The Symbol levels will define the rendering order of each Symbol layer. In this setup, the darker blue line is drawn first, for the whole set of features instead of for each feature individually; in the next draw pass, the lighter blue line is drawn, effectively on top of the first, again for the whole feature set. The road lines will have the visual effect of being joined smoothly.

Try this without the Symbol levels; each feature will have the border drawn in the order of the Symbol layer in the Symbology tab, but for each feature individually, with one feature (and its border) on top of the next (based on the order of geometries as present in the data):

  • with Symbol levels:

    ![enter image description here

  • without Symbol levels:

    ![enter image description here
  • 1
    @ThingumaBob, really a good answer! – Taras Sep 19 '18 at 11:20
  • 2
    @Taras thanks! took me quite a bit of patience with all those screenshots... – ThingumaBob Sep 19 '18 at 11:46
  • 2
    @Taras oh btw., since you're here, I notice you link the profile when adressing a user...apart from a nice personal etiquette that is not really necessary, the @ does notice the user in question. just saying ,) – ThingumaBob Sep 19 '18 at 11:53
  • Danke! I was not sure whether it refers to a user with a proper notification. But now I will know. Once again thank you for a hint! – Taras Sep 19 '18 at 12:17

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.