Dissolve to largest

541
3
02-26-2013 09:55 PM
MarcelGlasbergen1
New Contributor
I would like to be able to do a Dissolve (which is quite easy ny itself) based on a singe attribute, but I want to dissolve the features to the largest adjacent polygon and retain all its attributes. In ArcView 3.3 there used to be a tool that could do so (Dissolve Adjacent Polygons), but I can't find anything useable for ArcGIS. Before I try to figure out how the ArcView tool works and translate it to VBA or Python, does anyone know if I'm overlooking a ArcGIS tool that does something similar?
0 Kudos
3 Replies
curtvprice
MVP Esteemed Contributor
An approach I can think of is this:


  1. Dissolve your input by your single attribute

  2. Run an Identity_analysis of your input against the dissolved output.

  3. Sort (the tool, not just in table view) the identity output table by dissolvepolyID and area

  4. Merge this sorted table using FIRST for your attributes. Use the field map control to name the output fields as you need to.

  5. Join this result to your dissolve output table by dissolvepolyID

0 Kudos
MarcelGlasbergen1
New Contributor
I think that could do the trick. The only thing that I can't figure out is how to execute the merge based on the first feature. The only merge options I can find work with multiple datasets instead of the features in a single dataset. I can't find any useable options in the environments as well.
0 Kudos
curtvprice
MVP Esteemed Contributor
I think that could do the trick. The only thing that I can't figure out is how to execute the merge based on the first feature. The only merge options I can find work with multiple datasets instead of the features in a single dataset. I can't find any useable options in the environments as well.


Sorry, I was wrong about the Merge tool in step 4. The field mappings work across one row at a time, not across multiple rows.

The tool you need to use instead of Merge is Summary Statistics (Statistics_analysis), specifying LAST for each field of interest (after the sort, LAST is the one with largest area) and dissolvepolyID as a case_field.
0 Kudos