Take the 2-minute tour ×
Geographic Information Systems Stack Exchange is a question and answer site for cartographers, geographers and GIS professionals. It's 100% free, no registration required.

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:

enter image description here

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:

enter image description here

share|improve this question
add comment

1 Answer

up vote 2 down vote accepted

The morphological operators are designed for this, but I think your idea is better because it can be augmented to capitalize (potentially) on the elevation data.

First, RegionGroup the grid so that each apparent "island" gets separately identified. Use this as a basis for zonal summaries. Among your many options are:

  • If the zonal range of elevations within any island is negligibly small, you probably have an artifact (or a very small island).

  • Compute the 3x3 focal count of the island indicator grid. If the zonal max of that is strictly less than 9, your island is indeed too skinny.

  • Compute the island areas (cell counts). Temporarily shrink all islands by one cell (that's one of the morphological operators). Recompute the island areas. Eliminate those whose areas have changed too much (perhaps a reduction of 75%, or even 100%).

The results of the zonal summaries can be used to identify, and thereby select, the cells to erase. A conditional operation will take care of that final step.

share|improve this answer
    
Perfect. I tried a couple of the suggestions you laid out and was able to come up with a suitable solution. I'll edit the question to reflect the workflow I decided on. Thanks very much @whuber! –  Radar Aug 4 '11 at 21:32
add comment

Your Answer

 
discard

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.