I have a raster image representing islands in a river (see image) created using the following process:
1) Clip a water surface DEM and watershed DEM by a bounding polygon (waters' edge).
2) Subtract the water surface DEM from the watershed DEM (containing island - i.e. elevation values > waters surface).
3) Apply a conditional so that only values > 0 (above the water surface) are kept. All other values become 'no data'. This produces the following image:
By looking at this image you can generally pick out the large island and couple smaller ones. What I would like to do is only keep these islands and remove single pixels or lines of pixels that are artifacts of the clipping process. Is there a way to accomplish this in ArcObjects/ArcGIS 10?
I am thinking something along the lines of: Only keep a group of pixels if it contains at least a 3x3 window within it that contains values. This should produce only islands 3x3 or larger and remove any long artifact "strings" of pixels.
EDIT: Thanks to @whuber I've come up with the following solution. I'll continue on with step four from where I left off above:
4) Convert the output conditional raster to integer format.
5) Region group the integer raster.
6) Perform a Zonal Geometry analysis based on area.
7) Apply a condition to the raster from Step 3 based on the zonal geometry area. For this example I just used a "VALUE > 1", meaning an area larger than 1m square (given the original raster had a resolution of 30cm.
Here is the resulting raster: