Selecting neighboring cells in a raster

974
2
07-28-2011 11:53 AM
JoannaGrand
New Contributor
Using the raster calculator, I am selecting cells in a raster that are above a threshold value.  I also need to select cells that are adjacent to the selected cells.  The adjacent cells are below the threshold value so it needs to be done based on cell location.   Is there a way to do this?
0 Kudos
2 Replies
ChrisSnyder
Regular Contributor III
How about the expant tool: http://help.arcgis.com/en/arcgisdesktop/10.0/help/index.html#//009z00000036000000.htm It's basically a buffer tool for rasters.

Then you could use some map algebra (the con function) to figure out the areas in you raster that overlap the expanded areas.
0 Kudos
JoannaGrand
New Contributor
Thanks for the suggestion.  Unfortunately, I can't figure out how to get what I need using the expand tool.  What I'm trying to do is add orthogonal cells to diagonally adjacent cells so that I don't have any cells that are only connected diagonally. 

I figured out that if I convert the raster to a coverage, and then back to a raster, it adds those orthogonal cells in during the conversion.  This is a satisfactory solution.  I am curious though why this does not work if I convert it to a polyline and then back to raster.
0 Kudos