create outline/buffer on raster

01-12-2020 02:25 PM
New Contributor III

I have a raster of an alluvial outflow (sediment running off a hill, see attached image).  It is an integer raster and the flow is represented as 1s and non-flow as zeros.  I am trying to create an efficient outline of the flow area. It could be a buffer or a single polygon that shows the extent of the 1s.

I have tried converting the raster to polygons and using Eliminate Polygon Parts for a specified Area (eliminate polygons <1km2, for scale the flow is about 10km long).  This initially looks correct, but ArcMap is not actually deleting the eliminated polygons (they are still in the Attribute Table) and if you change the style (like outline thickness) suddenly all the inner small polygons reappear (somewhat maddening).  There is a similar bug in creating a layer by selection, where performing a style action brings back the unselected items.

So, I'm open to other options.  

I am on ArcMap 10.5 and I have a spatial analyst license.  Thanks in advance!


0 Kudos
3 Replies
MVP Notable Contributor

Sounds odd, you run the Eliminate Polygon parts tool, get no error and they disappear, but they reappear when you change the symbology? Have you loaded up the output say in another dataframe and confirmed? You may want to zip up your data and attach it to the question so people can test the scenario.

0 Kudos
MVP Legendary Contributor

If you do a raster Expand, followed by a Shrink of the same cell count, it will get rid of all those little open white areas to the left.  The key is to Expand the input raster (call it X), then Shrink X.  There is no science to this but a good guess (say expand by 5 cells, then shrink the expanded by 5 cells) will close up the holes (white areas), then when they are closed, they can't be reopened.

You large vacuous areas will need to be treated with a RegionGroup and a Nibble to fill in those areas... but start small, then worry about the big stuff


I failed to mention, you will be expanding class 1 assuming you want to get rid of the fiddly 0's

0 Kudos
New Contributor III

Thanks for the replies Duncan and Dan.

Duncan, re. the "reappearing polygons" - in the process of replicating the steps to attach/demonstrate the issue I can replicate it (the polygons stay in the Attribute Table) but the only reappear when I choose a style of Hollow with an outline.  If I choose a different Fill, all is good.  This lead me to discovering I could also just delete rows in the Attribute Table (though 500+ was annoying) to get the single polygon I wanted.

Dan, I will try your method with the raster directly and see if that is less work. Thanks.

0 Kudos