Draw a big circle. Then a smaller one on top and then a smaller one and a smaller one.

You see a stack of circles like a bullseye. If you had drawn these in QGIS the other way you would only see the largest one as it hides the others.

Is there a way in a single layer to slice every feature with every other?

Basically, I have contours and I only want the band between each polygon rather than the stack of progressively bigger polys like the bullseye example.

I have perfect data where all polygons are closed and sit perfectly inside each other.


2 Answers 2


If the contours are line feature class and are closed contour lines, as you can see below:

enter image description here

then you need to use lines to polygons tool from Processing toolbox -> QGIS geoalgorithoms -> Vector geometry tools -> lines to polygons

It will give you the following output, which is topologically not correct (Overlapping each other):

enter image description here

To modify the above topology, you need to use GRASS -> v.clean as @Klewis suggested from Processing toolbox -> GRASS GIS 7 commands -> Vector -> v.clean, and in cleaning tool use Break, as you can see below:

enter image description here

The output result is now topologically correct:

enter image description here

I selected a polygon in the above image to show you that it is a valid topology.

If the contours are already polygons in separate shapefiles, you can use difference tool repeatedly to get the difference between big polygons and smaller polygons and finally use Merge tool to put them in one polygon shapefile.

  • This is the best solution. Breaks up the polygons as expected and maintains attribution. Thanks
    – AK9
    Jun 15, 2017 at 15:43
  • v.clean consistently fails when used in QGIS on Windows 7. GDAL contour with -p works perfectly for small datasets, but can run for days on large files. Any other ideas? Feb 7, 2020 at 3:31

The geometric operation you're looking for is called 'union' in most software. In e.g. QGIS, the tool is under Vector -> Geoprocessing Tools. You can read about geometric operations here, for starters.

After unioning you'll have to do some work to reconcile the attribute data, but any advice about that process should go in a separate question, if you get stuck.

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.