Merging small polygons with biggest adjacent polygon using ArcGIS Desktop?

1789
10
07-21-2018 12:42 AM
Highlighted
New Contributor II
Hi
I have a polygon shapefile classifieds in different regions, and cities inside them. In each city there are many small polygons <2ha, that I'd like to merge to the biggest polygon adjacent to each one of them, as long as these polygons belong to the same city and region.

I don't want that polygons neighbors located in different city and region be united.

I'm looking for an automatic solution. I tried eliminate tools but ArcGIS does not differentiate the union between cities and regions.

Any ideas?

thanks

Tags (1)
Reply
0 Kudos
10 Replies
Highlighted
Occasional Contributor

If you are looking for automation, this can be achieved through a python script that will loop through all the city polygons and filter out the polygons except the selected city and run the union over them. This is based on an my understanding that Cities are inside Regions and you need to merge all those smaller polygons inside city polygons.

Reply
0 Kudos
Highlighted
New Contributor II

Thanks Mir Hashmi‌  You are right, the cities are inside regions. I do not know python. Could you help me with the script? thank you

Reply
0 Kudos
Highlighted
MVP Esteemed Contributor

Have you tried running Eliminate after creating a selection set for all polygons that have the same region and city?  I suspect that would work.  If so, you could write a Python script to automate the selections and using Eliminate.

Reply
0 Kudos
Highlighted
New Contributor II

Thanks Joshua Gardner Bixby I tried Modelbuilder with Iterate Feature Selection on region and cities, where ArcGIs select regions and cities iterate form, but them i need select micro polygons there, a second selections to use Eliminate> I could not do it, in the secod selection ArcGis use all polygons. I do not know python, can you help me please? Than you 

Reply
0 Kudos
Highlighted
MVP Esteemed Contributor

Jose, I understand now the limitation you are running into with using selections.  Just brainstorming, but what about the following:

  1. Make Feature Layer using a WHERE clause to limit records to given region and city
  2. Select By Attribute to select small polygons.
  3. Eliminate to merge the small ones into larger ones in same
  4. Delete tool to remove feature layer
  5. Repeat steps 1-4 for each region/city pair
Reply
0 Kudos
Highlighted
New Contributor II

Hi @Joshua Bixby

Thank you. Yes, i can do it that you talk me, but the problem is that i have 190 cities, so i need repeat the proces 190 times, it is so much time to do it. I would like to find a automatic solution because is a problem that i usually have.

Thank you

Reply
0 Kudos
Highlighted
MVP Esteemed Contributor

You mentioned using ModelBuilder.  Although I don't use, I prefer to script it out myself, I am sure if can handle this task.  Can you create a list of the 190 cities and feed it to a iterator/loop in ModelBuilder where it repeats steps 1-4 above?

I would gin up some sample code to get you started, but if you don't have much scripting experience, I am not sure if you could extrapolate from my sample code to a working script.

Reply
0 Kudos
Highlighted
New Contributor II

@Joshua Bixby I tried to do it:

In the iterate feature selection, from a polygom shapefile that have all regions and cities, ArcGis select by fields Region and City (190 combinations), but in the next step "Select Layer by Attribute" selects all rows without taking into account Region and City, so result is not correct. The model generates 190 layers (names by region and city) with the same records

Reply
0 Kudos
Highlighted
Esri Esteemed Contributor

Hi jmonrealnunez , you have a similar question in this thread: Is it possible to do a geoprocess automatically with all the layers of a folder?  It might be more efficient to just use a single thread for the same question. 

Reply
0 Kudos