Hi, I'm using ArcGIS Pro 2.9 and have a python version 2 script written with ArcMap 10.3.
The script bombs out on the following line:
arcpy.gp.FocalStatistics(inputFC, outFileName, inExpression, "MEAN", "DATA")
with the error: Object: Tool or environment <FocalStatistics> not found.
Does "arcpy.gp" NOT exist any more? I realize there is focal statistics in arcpy.sa. Is that the only one I can use, it doesn't allow an output file raster to be specified.
Greg.
Solved! Go to Solution.
Thanks Dan.
I was hoping there was an equivalent to arcpy.gp in Arc Pro, but evidently not.
Focal Statistics (Spatial Analyst)—ArcGIS Pro | Documentation
you save it after
# --
from arcpy.sa import *
outFocalStatistics = FocalStatistics(......
outFocalStatistics.save("C:.....
or
outFocalStatistics = arcpy.sa.FocalStatistics(......
outFocalStatistics.save("C:.....
Thanks Dan.
I was hoping there was an equivalent to arcpy.gp in Arc Pro, but evidently not.
...or
arcpy.gp.focalstatistics_sa(inputFC, outFileName,...
Ahaaaa, Thanks.