Select to view content in your preferred language

How to fill "holes" in Raster / Polygon?

10807
7
Jump to solution
04-22-2020 12:29 PM
JosuaInauen
Emerging Contributor

Is there a way to automatically fill such holes which aren't really holes?

Thx in advance!

0 Kudos
1 Solution

Accepted Solutions
DanPatterson_Retired
MVP Emeritus

Or for the case being shown...

  • Expand the raster (maybe by 2 cells) the buffer equivalent for rasters, then a
  • Shrink the result of the above by the same amount

This Expand/Shrink sequence can be used to get rid of inner inclusions and exterior fiddly-bits as well.  You can repeat the above overwriting the temporary grids,  It is an alternative to pointing at the screen and saying get rid of that bit

View solution in original post

7 Replies
Alena
by
Regular Contributor

We use the Fill tool. Spatial Analyst Tools > Hydrology > Fill

DavidPike
MVP Frequent Contributor

For a vector, a handy trick is to use the Union geoprocessing tool with only one input and the 'allow gaps' option disabled.  It is however a bit temperamental. 

SteveLynch
Esri Regular Contributor

You could use the Con tool

DavidPike
MVP Frequent Contributor

How would this be implemented Steve? is there some way to look for containment?

DanPatterson_Retired
MVP Emeritus

Or for the case being shown...

  • Expand the raster (maybe by 2 cells) the buffer equivalent for rasters, then a
  • Shrink the result of the above by the same amount

This Expand/Shrink sequence can be used to get rid of inner inclusions and exterior fiddly-bits as well.  You can repeat the above overwriting the temporary grids,  It is an alternative to pointing at the screen and saying get rid of that bit

JosuaInauen
Emerging Contributor

Many thanks! Exactly what i needed:)

0 Kudos
DanPatterson_Retired
MVP Emeritus

Glad it worked.

0 Kudos