Implementing neighborhood notation in Arc 10?

Discussion created by curtvprice Champion on Apr 29, 2011
Latest reply on Aug 8, 2013 by curtvprice
Does anyone know if the following docell code can be done with map algebra in ArcGIS 10?

if (flr_ezg eq 1) to_flg_lg = flg_lg_ezg(1,0)
if (flr_ezg eq 2) to_flg_lg = flg_lg_ezg(1,1)
if (flr_ezg eq 4) to_flg_lg = flg_lg_ezg(0,1)
if (flr_ezg eq 8) to_flg_lg = flg_lg_ezg(-1,1)
if (flr_ezg eq 16) to_flg_lg = flg_lg_ezg(-1,0)
if (flr_ezg eq 32) to_flg_lg = flg_lg_ezg(-1,-1)
if (flr_ezg eq 64) to_flg_lg = flg_lg_ezg(0,-1)
if (flr_ezg eq 128) to_flg_lg = flg_lg_ezg(1,-1)

I would like to code in arcobjects c# with map algebra. I have read about numpy array as one way to do it in python.

Thanks for any help

Bruce Vandenberg

Bruce, Neighborhood notation is not supported at Arc 10. We've been asking. Please do contact tech support on this. They may send you to using numpy rasters to do this kind of thing.

Another workaround may possibly to use the MultiOutputMapAlgebra tool, but it isn't supported at 10.0 although it is still there in the gp object.

You may be able to work out something using the Shift tool to offset a bunch of rasters and then use Pick to select the right one from the list. You can convert the powers of two to 1...8 using this map algebra expression. This could be used with Pick.

(Log2(flr_ezg) + 1)

Hope this helps you out!