Want to automate process of creating donut and separating from the island

2068
5
Jump to solution
08-30-2012 09:52 AM
JimDahl
Occasional Contributor
I want to make a donut hole "island" out of a polygon.  I cannot find a tool to use in my model that will automate this process.  UNION will create the island but I see no attribute that will identify the island from the remaining polygon that I want to keep.  I start  out with two polygons, the main poly and the island poly.  The union tool will create two polys from the main one, the donut and the hole.  I want to keep the donut but it has the same attributes and the hole.  Any suggestions would be helpful.

Thanks, Jim
0 Kudos
1 Solution

Accepted Solutions
DanLee
by Esri Regular Contributor
Esri Regular Contributor
The input to Select Layer By Location has to be a layer. In ModelBuilder, you can use Make Feature Layer tool after a feature class and before Select Layer By location tool. Otherwise you can use a displayed layer in the map.

About creating the donut polygon:

- Let's name your data as mainPolygon and islandPolygon. Use Union tool to combine them into unionPolygons.
- Use Select Layer By Location (assuming the unionPolygons is displayed in the map) tool with unionPolygons as input features and islandPolygon as the select features, with the ARE_IDENTICAL_TO option. The inner/island polygon in the unionPolygons should be selected.
- Run Delete Features tool using the unionPolygons as input features; it will delete the selected island from the unionPolygons. What's left should be a donut polygon.

Is that how you tried?

View solution in original post

0 Kudos
5 Replies
DanLee
by Esri Regular Contributor
Esri Regular Contributor
You can use Select Layer By Location tool to select the unioned island by the original island and then Delete Features to delete the selected island (hole).

If you have ArcInfo license, you can use the Erase tool to erase the main polygon by the island polygon.
0 Kudos
JimDahl
Occasional Contributor
You can use Select Layer By Location tool to select the unioned island by the original island and then Delete Features to delete the selected island (hole).


Thanks, I see that I can select the created island by using ARE_IDENTICAL_TO.  However, it only works if I convert the shape file to a Layer and it still selects both island and not island.  Do I need to use a separate island input layer for the select tool?
0 Kudos
DanLee
by Esri Regular Contributor
Esri Regular Contributor
The input to Select Layer By Location has to be a layer. In ModelBuilder, you can use Make Feature Layer tool after a feature class and before Select Layer By location tool. Otherwise you can use a displayed layer in the map.

About creating the donut polygon:

- Let's name your data as mainPolygon and islandPolygon. Use Union tool to combine them into unionPolygons.
- Use Select Layer By Location (assuming the unionPolygons is displayed in the map) tool with unionPolygons as input features and islandPolygon as the select features, with the ARE_IDENTICAL_TO option. The inner/island polygon in the unionPolygons should be selected.
- Run Delete Features tool using the unionPolygons as input features; it will delete the selected island from the unionPolygons. What's left should be a donut polygon.

Is that how you tried?
0 Kudos
JimDahl
Occasional Contributor
Thanks for the suggestions.  I have succeeded but using slightly different approach, using select by attributes.

I first dissolve multiple polygons into one.
Then create two feature classes, one just for islands and the other for the main polygons.  This accounts for 8 polygons.
I union these together and convert to Feature Class with Attribute selection where Island FID = -1.
Finally, I need to merge with the other 2,000+ polys (ones that are not island or main) to get 2,000 + 8 polys.

Your suggestion

- Let's name your data as mainPolygon and islandPolygon. Use Union tool to combine them into unionPolygons.

got me over the edge.

Jim
0 Kudos
DanLee
by Esri Regular Contributor
Esri Regular Contributor
You are welcome. That's cool!  Have fun geoprocessing.
0 Kudos