ArcGIS Focal Statistics Returns Out-of-Bounds Result

I am trying to compute a moving window maximum on a raster, such that the output is the max within a 5 mile radius. This should result in an output grid where the maximum is equal to the maximum of the input grid. I am using the FocalStatistics function in spatial analyst,

Here is the code:

import arcpy
from arcpy import env
from arcpy.sa import *
env.extent = "MAXOF"
arcpy.CheckOutExtension("Spatial")

localMax = FocalStatistics(InRaster, NbrCircle(5, "MAP"), "MAXIMUM")

Pretty straight forward. But if I check that stats: arcpy.GetRasterProperties(localMax, “MAXIMUM”) The value returned is 3.4e+38 (out to lunch), whereas:

arcpy.GetRasterProperties_management(inRaster, “MAXIMUM”)

returns 5.73

I have used this function without problems before – I am out of ideas. Anyone?

edit: inRaster is projected, and the linear unit is Miles (US)

• Ignore NoData can play tricks – FelixIP Feb 18 '16 at 0:47
• Felix - Good point, I tried with the ignore NoData parameter set to True, and then False. I got the same result! Am I applying this correctly? localMax = FocalStatistics(InRaster, NbrCircle(5, "MAP"), "MAXIMUM", True) – Sarobinson Feb 18 '16 at 1:07
• Further testing, tried both "DATA" and "NODATA" in the ignore NoData parameter. Same result – Sarobinson Feb 18 '16 at 1:15
• If this is standalone script, "MAP" parameter might not work, try CELL – FelixIP Feb 18 '16 at 1:32
• No luck with "CELL" either. I tried both "DATA" and "NODATA" with it as well. Fixed my GetRasterProperies_management in the question. Thanks Felix – Sarobinson Feb 18 '16 at 1:47

This works perfectly fine

import arcpy
from arcpy.sa import *
inRaster=arcpy.Raster(r'D:\Aerials\Backups\arc2mdem')
localMax = FocalStatistics(inRaster, NbrCircle(5, "MAP"), "MAXIMUM")
result=arcpy.GetRasterProperties_management(localMax, "MAXIMUM")