6

I have a layer with over 400 polygons. They are all really close within the same area of a city. I would like to calculate the percentage of overlap of every polygon with every other polygon.

I unfortunately only find information about how to do this with two different layers. But I want to calculate the overlap of the polygons with each other in only one layer.

My goal is for example to know that Polygon1 overlaps 40% with Polygon2 within this layer. Maybe you have some ideas?

2
  • 2
    use the same layer twice
    – JGH
    May 9, 2020 at 15:48
  • Already tried, but I can't find a way to calculate the overlap of all the polygons within the layer. Which function could I use for calculating this? May 9, 2020 at 15:49

2 Answers 2

5

I am assuming you have a single layer that contains the 400 polygons. Each of these polygons should have a unique "ID" field for this to work. This could be an integer, or if each of the polygons has a unique name then that would be fine too.

The first step is to use the "Split vector layer" tool from the Processing Toolbox (Ctrl+Alt+T) with the input being your 400 polygon layer and your unique "ID" field as the one that meets the criteria explained above. You then need to save this into a directory of your choosing. You can delete these after all this if you want to probably just create a folder somewhere that is easy to remember on your operating system.

Next, you want to use the "Overlap analysis" tool also found in the Processing Toolbox. This can only be found in QGIS versions 3.8 and later. You want your original 400 polygon layer to be your input layer. For the overlap layers, you need to add the directory where you just saved all of the individual layers in the previous step. This will create an output layer that is a replica of the original, but it will have appended new fields to the attribute table for each of the overlay layers. This has the overlap percentage for each feature to each feature. So it is essentially a matrix.

1
  • Thank you so much! This is exactly what I needed. I was missing the "Split vector layer"-part. May 9, 2020 at 16:42
0

In ArcGIS I would try to run the tool 'Tabulate Intersection' which shows you how much percentage one layer overlaps with another (you can also specify the intersection by their attributes, for more information watch this). In this case you could double your layer.

I think QGIS unfortunately doesn't offer a function called 'Tabluate Intersection' but this post shows how to create you own.

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.