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.
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?