2

This question already has an answer here:

I am working in QGIS 2.8.1.

I have a shapefile of polygons, each of which has a unique ID and a count value that represents a point count within that polygon. Many of the polygons overlap.

Where these polygons overlap, how can I get the count value to reflect the sum of the count values of all polygons that overlap that area (there are often more than 2 overlapping polygons)?

Ideally I would like to split the polygons where they intersect with each other and create a new table with a row for each polygon section and the corresponding point count value. The point count value would equal the sum of the point count values from all the polygons that overlap that area.

For example, in the picture below, if the 3 polygons have count values of 1, 2 and 4, I'd like the yellow highlighted area to have a count value of 7.

enter image description here

I have explored the intersect and union tools (using the shapefile as both the 'input' and the 'intersect' layer) but this only ever returns the intersection/union of two polygons. i.e. I get the intersection of A with B, and for B with C but not for A,B and C. And as far as I can tell there is no logic (without looking at the map) to determine whether A, B and C do indeed overlap.

marked as duplicate by radouxju, Mapperz Jun 9 '15 at 17:53

This question has been asked before and already has an answer. If those answers do not fully address your question, please ask a new question.

  • I'm not sure I understand the logic of how you're working with those point counts because you're essentially counting the same points multiple times. That aside, if QGIS behaves the same way as ArcGIS the issue is that your overlaps are in the same file. You should be getting stacked polygons - one for every possible input combination; the example image should union to 12 polygons and intersect to 9. If you were unioning separate files that had no internal overlap, you'd get the result you seek. There are some simple ways to attack this in ArcGIS, but I'm not aware of equivalents in QGIS. – Chris W Jun 10 '15 at 3:09
  • Actually it looks like a Join Attributes by Location should do it. Possibly on your original polygons, possibly after a union if that behaves as described above. – Chris W Jun 10 '15 at 3:12