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 unfortunatley 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.

  • 1
    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

1 Answer 1


I am assuming you have a single layer which 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.

First step is to use the "Split vector layer" tool from the processing toolbox 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 so 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 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 which 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.

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

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.