Geographic Information Systems Stack Exchange is a question and answer site for cartographers, geographers and GIS professionals. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I am using ArcGIS Desktop 10.0.

I have a trick for removing the donut holes, which is converting the polygon to line and then creating polygon out of the lines and in the end merging all of them. The drawback of this strategy is that in removes other holes and empty areas which in reality are empty and should be kept empty. See below image:

enter image description here

share|improve this question
I've voted to keep this question open because I believe the OP is trying to remove some but not all donuts. He's looking for a way to keep some of them. – Fezter Jul 15 '13 at 4:42
Thanks! I have added the image, I hope that clarifies everything. I can not go ahead and remove bigger areas before merging everything together because I may incidentally remove the main polygons (the green one itself). – Arash Jul 15 '13 at 5:21
Very similar to How to remove small “salt & pepper” polygons from a layer?, but using a QGIS process. You could probably work with very similar processes in ArcGIS. – RyanDalton Apr 22 '14 at 18:18
It's only the threshold size above which holes should not be filled that prevents this being a duplicate of Filling in Donut Polygons using ArcGIS for Desktop? – PolyGeo Feb 16 at 23:51
up vote 15 down vote accepted

I would try the Union tool with NO_GAPS:

NO_GAPS —A feature will be created for the areas in the output that are completely enclosed by polygons. This feature will have blank attributes.

You can then select the features with blank attributes below a threshold size and calculate their attributes to be the same as the original polygon - or copy/paste them in the Editor's Attribute window.

Features with blank attributes above the threshold size should be deleted.

From there the Dissolve tool should complete the job.

share|improve this answer
how do you "calculate [the new donut poly] to be same as the original [containing] polygon"? They don't have any attributes values in common, so can't be joined. How does Island poly C know it should acquire it's new attrib values from (containing) Lake poly A and ignore (somewhere else) Lake poly B? – matt wilkie Feb 16 at 23:32
I've not done a recent test but "the new donut poly" is the "original [containing] polygon". If there are multiple such donut polygons to process in bulk then tagging the small holes with the donut polygon they fall inside would be necessary. – PolyGeo Feb 16 at 23:49

You can use "Eliminate Polygon Part" tool (Data Management Tools -> Generalization) in ArcToolbox. You can specify minimum hole area/percentage to remove.

share|improve this answer
This function requires Advanced/ArcInfo license level though. – Martin Apr 22 '14 at 11:51

PolyGeo's solution is one I have employed myself and works well (+1). Another alternative is to buffer your polygons by a small amount and then de-buffer the result by the same amount (say +1m and then -1m). This also works well but carries a small risk of accidentally joining polygons that neighbour by the same amount as your buffer. It can also increase your vertex count (which may or may not be a problem).

You could also write a script for a robust solution by iterating over each polygon, creating temporary polygons based on the interior rings and testing these for their areas. If they are below your threshold, you then remove that interior ring from the geometry and update your row. This solution is more work than PolyGeo's solution or my buffer hack above but is possibly a "purer" approach.

share|improve this answer

Here's another way to remove lakes from polygons (like the zip code map layer from Navteq). This is also useful to clean up territory map layers that have been generated by dissolving the zip code map layer by the territory code.

  1. Use a Geoprocessing "Union" on the polygon map layer and remove the checkbox for “Gaps Allowed” (which is checked by default.) This creates polygons for all of the "donut" holes in the polygons.
  2. In the resulting Union map layer, add fields for ID, X, and Y. The ID should be separate from the name/ID of the polygons that have the donut holes that you want to remove.
  3. In the attribute table, use the Field Calculator to calculate the ID from the ObjectID field and use "Calculate Geometry" to fill in the X and Y values.
  4. Separate the donut polygons from the other polygons by selecting (Select by Attributes) those where the name field is null.
  5. Export the selected records to a new table. (table options dropdown-->Export...)
  6. Use the "Add XY" option to create an event layer. (right click layer-->Display XY Data....
  7. Export the event layer to a new feature class. (right click the layer-->Data-->Export data)
  8. Do a spatial join between the new point layer and the ORIGINAL polygon map layer that does not have the donut polygons. Use the “closest” option so that the name of the surrounding polygon gets appended to the attribute table of the donut polygons.
  9. Use a standard table join between the joined point layer and the resulting map layer from the Union (based on the ID field). (right click layer-->Joins and Relates-->Join-->Join data from another layer based on spatial location)
  10. Use the Field Calculator in the attribute table to calculate the null polygon names from the joined point layer.
  11. Run a Geoprocessing "Dissolve" based on the polygon name to merge the donut polygons with the larger named polygon.

Note that this will not correct the problem of the rivers that are cut into the outline of the polygon, but it does improve the original map layer by removing the inner donut holes.

share|improve this answer

If polygons in the feature class contain other polygons in the same feature class (ex. Lesotho inside of South Africa) and if you need to eliminate manual editing in favor of ModelBuilder, etc., using "Eliminate Polygon Part" is the quickest solution. Tool settings:

-"Condition (optional)" = AREA -"Area (optional)" = a very large number (say, 1e+100) -"Eliminate contained parts only (optional)" = [checked]

This will yield a South Africa which has Lesotho's area filled in, essential for workflows such as outputting vertices for use in Polygon visuals in Tableau.

share|improve this answer

Since it hasn't been mentioned so far and it seems to be the right tool for exactly what you are trying to achieve: Aggregate Polygons

Set the minimum_hole_size to the minimum size of a polygon hole you want to keep. Smaller ones will be eliminated.

PS. The optional minimum_area value in the same tool does the same for the polygon parts that are not holes.

share|improve this answer

I was looking to create legit donuts, perfectly round buffers.

If you use the multiring buffer tool and select dissolve all.

You can then delete the smaller of the 2 buffers leaving a perfect donut.

share|improve this answer
this is a potentially useful trick but off topic for this question, which is about removing existing donut holes. – matt wilkie Feb 16 at 23:21

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.