I am trying to calculate the maximum value in a neighborhood on a raster using the Focal Statistics tool for Spatial Analyst in ArcGIS 10. Using python, I loop though several different radii, with each defining a circular neighborhood, as below:

bandwidth = [1609.344*.125,1609.344*.25,1609.344*.5,1609.344*1,1609.344*2,1609.344*4,1609.344*8,1609.344*16]
for bw in bandwidth:
    kd = "copc_kd_06_" + str(count)
    nhMax = FocalStatistics(kd, NbrCircle(bw, "MAP"), "MAXIMUM", "NODATA")

Note that the "1609.344" is the conversion from meters to miles, so I'm trying to find the neighborhood maximum at 0.125, 0.25, 0.5, 1.0... miles. The problem is that 0.125, 0.25, 0.5, and 2.0 perform well, while 1.0, 4.0, 8.0, and 16.0 produce extremely odd results, as shown below.

Odd results in focal statistics

So, specifically, instead of the circular neighborhoods given in the command, it produces irregular neighborhoods of circles split in three.

Has anyone else seen this, or do you know of a workaround?

  • Well, I fixed this problem by converting my "map" radius measurements to "cell" radius measurements. I'm not sure if this problem is general enough to be worth keeping. Advice? Should I delete?
    – Patrick
    Commented Sep 6, 2011 at 2:09

1 Answer 1


After much consternation, I solved this problem by converting the neighborhood definition NbrCircle(bw, "MAP") from MAP units to CELL units. In my case it merely required dividing my bw value by 150, the cell size.

This is buggy behavior, and I believe it is related to a known bug.

  • 1
    +1 This is a new bug, by the way, introduced into functionality that has existed for a long time. (In earlier versions ArcGIS wasn't even able to do focal calculations in a timely manner with large neighborhoods.)
    – whuber
    Commented Sep 6, 2011 at 16:05

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.