I would like to use a nearest-neighbor type analysis to iterate over a raster. The nearest neighbor analysis will give a cell value of 1 IF AND ONLY IF the cell being analyzed has a cell value larger than all adjacent cells, and 0 otherwise. Is this type of analysis possible with Arcobjects or with the raster calculator tool using map algebra?
Con(inraster > FocalStatistics(inraster, NbrIrregular(kernel_file), "MAX", ""), 1, 0)
Where: kernel_file is a path to a text file that defines a neighbourhood that excludes the currently processed cell, something like:
3 3 1 1 1 1 0 1 1 1 1
You might also be able to do this with an annulus neighbourhood, but I can't test as I'm not at work.