How to Merge/dissolve adjacent polygons to the largest one

2238
7
12-13-2020 04:48 PM
SaifulAlam
New Contributor II

Hi, I have about 200k records. I'd like to merge/dissolve the records to the largest polygon.

This is what I currently have:

 
SaifulAlam_2-1607906659869.png

I'd like it to look like this:

SaifulAlam_3-1607906703063.png
 

Eliminate or dissolve tool are not going to work I think. Any other ideas? I am working in ArcGIS Pro.

Thank you in advance.

0 Kudos
7 Replies
DavidPike
MVP Frequent Contributor

It's certainly possible, but I don't quite understand the rationale, and I can't see how the expected output you've shown comes from those numbers.  Maybe a merge rule/field mapping of 'SUM'.  Although it seems like you've created an example in Excel which doesn't make much sense, what do you actually want to achieve?

0 Kudos
SaifulAlam
New Contributor II

Hi David, thank you for reply.

Yes, I have created the example in Excel. Sorry for Confusion.

Let me try this way... Lets say I have 5 Polygons. All of them has same ID, But each polygon has different Zoning. I'd like to merge all 5 polygons to 1 and that polygon will take the attributes (zoning) of the largest polygon out of 5.

Hope this makes sense. I have created a column that has what percentage of area each one of the polygon has.

I am trying field mapping in merge now.

Thanks again.

0 Kudos
JoshuaBixby
MVP Esteemed Contributor

I agree with David, additional explanation would help us help you.  The way I understand your current example, all you would need to do it select the largest polygon for each color and then change the percent to 100.  If you can explain why Dissolve won't work for you, specifically, that might help people give you feedback.

0 Kudos
SaifulAlam
New Contributor II

Hi Joshua, Thank you.

Sorry again for confusion. I am trying to dissolve polygons that has same ID but different zoning. My goal is the dissolved Polygon will take the attributes of the polygon that has largest area (or percentage of area).

I feel like there should be a simple solution to this (may be not!), just can't get my head around it.

Thanks again for your help.

0 Kudos
DavidPike
MVP Frequent Contributor

It is actually a bit tougher than it appears.

There's 2 workflows I can think of:

Dissolve everything with no field maps etc.

Run a spatial join to get the attributes. (The hard part is that the spatial join can have field mappings/merge rules for the maximum value, but that only applied to that specific field, i.e. I think the attributes of any other coincident feature could go into the other fields.  One solution is to possibly assign a code to you area field, e.g. shape_area end in 0.01 for Red, 0.02 for Blue... then you can use the Max Merge Rule on that field, and be able to match them back up after with a simple field calculation (e.g. if last digit is 1, field = 'red'...).

The other would be to run the dissolve, but then run an Update/Search Cursor to compare attributes of intersecting geometries (e.g. SHAPE@.disjoint, and then update the attributes with those of the largest shape_area) this isn't overly complex, but it does require some knowledge of arcpy scripting. 

0 Kudos
SaifulAlam
New Contributor II

Thank you David.

I will try the first options first. Let you know how it goes.

Seems like a common problem for GIS users. I wish the dissolve tool field mapping would let me pick the value  from the text field that are largest by size (area).

Thanks again.

0 Kudos
SaifulAlam
New Contributor II

Ok, found an easier solution if anyone has similar problem.

I sorted ID (ascending) and Percentage(Descending) column using Sort tool . Then used dissolved tool, dissolve field = ID, Statistics field, zoning = First.

Thank you all for your help. 

 

0 Kudos