An error occurs when attempting to save the output from a Spatial Analyst Math tool if it is executed after the Zonal Statistics tool in a Python script.
The script has some errors. The line for setting overwrite output data should be:
env.overwriteOutput = True
解决办法
Use the syntax exported by Mode lBuilder. The syntax includes an additional parameter for the output raster (out_raster). For example:<a href="http://arcpy.gp" target="_blank">arcpy.gp</a>.ZonalStatistics_sa(in_zone_data, zone_field, in_value_raster, out_raster, {statistics_type}, {ignore_nodata})<a href="http://arcpy.gp" target="_blank">arcpy.gp</a>.Minus_sa(in_raster_or_constant1, in_raster_or_constant2, out_raster)