I want to clean up a raster layer by generalizing in a way that any "island" cells are eliminated. There are only 2 values in the layer, 0 and 6. So, for any cell that is currently of value 6 that is surrounded by all 8 cells with a value of 0, I want to change the "island" cell from a 6 to a zero.

There must be a way to do this, but I am new to using raster analysis in arcgis and have tried everything I can think of.

Thanks for any ideas.

Stephanie

There must be a way to do this, but I am new to using raster analysis in arcgis and have tried everything I can think of.

Thanks for any ideas.

Stephanie

thanks

STephanie

Later I used this myself for all 8 directions to make temporary grids for each of the 8 directions. Each shift is to one of the eight directions. My grid dimension is 10, so I have (10,10) (10,0) (10,-10), (0,-10), (0,10) (-10,10) (-10,0) (-10,-10). Then I used different tools to get the results I wanted.

You could do the same. If you use Cell Statistics tool with the choice of "Max" of the eight rasters, any place where the max is 0 and the original grid is 6 you should make the results 0. Otherwise the value should be the same as the original. You can use the Con() function for making this decision.

I did my work in model builder and below is an image of my modified model for your situation.

[ATTACH=CONFIG]21989[/ATTACH]

## Attachments

not elegant but it worked in the end. I think I could have eliminated a few steps but am unfamiliar with the tools and couldn't find the ones I needed for a more efficient overlay.

thanks for the ideas.

Stephanie

You can use Region Group and Zonal Geometry to find the area of each clump of contiguous values, then use Set Null to mark the areas you want to remove as NoData, followed by Nibble to fill them in with nearby values.