Select to view content in your preferred language

Merge intersecting polygons with statistics calculation

324
4
Jump to solution
04-02-2025 01:42 AM
Labels (1)
Pierre_Bouxin
Emerging Contributor

Hello,

I have a feature class with polygons that can overlap in some cases. I'd like to merge the intersecting polygons into one geometry (but not all the geometries into one) and then sum a field of these merging geometries.

Pierre_Bouxin_0-1743583233307.png

Pierre_Bouxin_1-1743583304383.png

 

 

I've tried using the “Pairwise Dissolve” tool, which does a good job of merging my geometries, but in terms of statistical calculation, the sum is based on the entire feature class and not just the intersecting geometries. Is there a way to do this?
Thanks

0 Kudos
1 Solution

Accepted Solutions
Robert_LeClair
Esri Esteemed Contributor

So I tested this workflow and I "think" it will get you where you need to be.

1.  Add a new field (Float or Double) called SUM_AREA or whatever you'd prefer to call it.
2.  Calculate geometry of the new SUM_AREA field to get the square area of each polygon.
3.  Add a second new field (Short) called ID or whatever you'd prefer to call it.
4.  Select all the polygons that touch or intersect with each other and calculate the ID field with1, 2, 3, 4, etc.
5.  Run the Pairwise Dissolve GP tool with the Dissolve Field being ID and the Statistics Field being the SUM_AREA field with SUM as the statistic type.
6.  A new feature class is created with total sum by ID areas.

I believe this will give you the output you're looking for.  Let me know if you have additional questions!

View solution in original post

4 Replies
DanPatterson
MVP Esteemed Contributor

Perhaps you can illustrate what you want to see in the table?

If those are multipart shapes, can you use a MultipartToSinglePart tool on the result, then use a Spatial join of the original data back to that.


... sort of retired...
0 Kudos
Pierre_Bouxin
Emerging Contributor

Of course, here's an example of my attribute table. Each line corresponds to a geometry.

Pierre_Bouxin_0-1743596169773.png

And after the merge, the sum was done on the whole table, not just the intersecting geometries.

Pierre_Bouxin_1-1743596755560.png

 

 

0 Kudos
Robert_LeClair
Esri Esteemed Contributor

So I tested this workflow and I "think" it will get you where you need to be.

1.  Add a new field (Float or Double) called SUM_AREA or whatever you'd prefer to call it.
2.  Calculate geometry of the new SUM_AREA field to get the square area of each polygon.
3.  Add a second new field (Short) called ID or whatever you'd prefer to call it.
4.  Select all the polygons that touch or intersect with each other and calculate the ID field with1, 2, 3, 4, etc.
5.  Run the Pairwise Dissolve GP tool with the Dissolve Field being ID and the Statistics Field being the SUM_AREA field with SUM as the statistic type.
6.  A new feature class is created with total sum by ID areas.

I believe this will give you the output you're looking for.  Let me know if you have additional questions!

Pierre_Bouxin
Emerging Contributor

Thank you very much, it worked well on my example.