Hello,

Just running a simple focal statistics analysis on a grid surface of vegetation density, summing up values for each cell within 2 nearest neighbors (rectangle) in the width and height. The tool runs fine, but the sums in the output raster for each cell don't jive with what's in the input raster. For example, one cell in the input raster has a value of 3,239. The value of that cell in the output raster should be the sum of the cells in the surrounding 2-cell rectangular neighborhood, but it is far less (12,038) than what it should be. In fact, the sum of the values in just 1 nearest neighbor, which I calculated manually, would be much more (39,002). I've run the tool several times (screenshot attached). Is there just something I don't understand about the way this tool works, or did I set something up wrong?

thanks,

-Neil

Just running a simple focal statistics analysis on a grid surface of vegetation density, summing up values for each cell within 2 nearest neighbors (rectangle) in the width and height. The tool runs fine, but the sums in the output raster for each cell don't jive with what's in the input raster. For example, one cell in the input raster has a value of 3,239. The value of that cell in the output raster should be the sum of the cells in the surrounding 2-cell rectangular neighborhood, but it is far less (12,038) than what it should be. In fact, the sum of the values in just 1 nearest neighbor, which I calculated manually, would be much more (39,002). I've run the tool several times (screenshot attached). Is there just something I don't understand about the way this tool works, or did I set something up wrong?

thanks,

-Neil

o o o o o

o o o o o

o o x o o

o o o o o

o o o o o

a 2 x 2 neighborhood probably looks more like this:

o o

x o

If you are looking for someone to break it down with you, to see exactly what may be occurring, I encourage you to create a Support Incident and the Analyst should be able to explain it.

-----------------------------------------------------------------------------------------------------------------------

Rectangle

The x,y position for the processing cell within the neighborhood, with respect to the upper left corner of the neighborhood, is determined by the following equations:

x = (width of the neighborhood + 1)/2

y = (height of the neighborhood + 1)/2

If the input number of cells is even, the x,y coordinates are computed using truncation.

For example, in a 5 x 5 cell neighborhood, the x- and y-values are 3,3. In a 4 x 4 neighborhood, the x- and y-values are 2,2.

The units for the width and height values can be defined in cells or in map units.

Focal statistics with rectangle neighborhood illustration

This article in the help explains it well, had I bothered to dig a little deeper:

http://help.arcgis.com/en/arcgisdesktop/10.0/help/index.html#/How_Focal_Statistics_works/009z000000r7000000/

Thanks for clearing this up for me.

-Neil