QGIS – How to Perform Multiple Layer Intersections

countintersectionqgis

I am trying to find a way with QGIS to get the intersection area of more than 2 layers.

All the tools in QGIS take just the 2 input layers.

For example in the image below, I have 4 layers and I want to retrieve just the black area.

Furthermore, I need to retrieve the count attribute and add it to the intersected area attribute table (in this case 4)

enter image description here

I know there is a tool that does the trick in ArcGIS, but is there a QGIS solution?

Best Answer

For a layer's feature to be represented in all layers it must be represented in any selection of two layers a well. Using this theory you can simply run multiple intersection functions according to the order below. The example assumes 4 total layers named Layer1, Layer2, Layer3, and Layer4.

  1. Run an intersection between Layer1 and Layer2 to get Output1.
  2. Run an intersection between Output1 and Layer3 to get Output2.
  3. Run an intersection between Output2 and Layer4 to get Output3.

Output 3 should contain all features that appear in all 4 layers. For the 'Count' field, I think you can just file it with the number of layers involved in the intersect, unless I am mistaking what data you want that field to hold.

This method isn't eloquent and if you have many layers or layers with many features it could prove time consuming but it should work and is a simple process to put together.