oldenbu1

Error when adding rasters and changing null values to zero in Python

Discussion created by oldenbu1 on Feb 14, 2013
Latest reply on Feb 15, 2013 by Hornbydd
Hello!

I am trying to run a Python script in ArcMap that will add together several rasters to create hotspots map. I also want to change null values to a value of zero. Below is the script and the error I have gotten. Any suggestions would be greatly appreciated. Thank you!


>>> arcpy.env.overwriteOutput = True
>>> while x <= len(ras_list):
...     print x
...     ras1 = ras_list[x]
...     print ras1
...     out_ras1 = arcpy.sa.Con(arcpy.sa.IsNull(ras1), 0, ras1)
...     rcl_ras = infolder + "\\" + ras1 + "_rcl"
...     out_ras1.save(rcl_ras)
...                  
...     if x == 0:
...         temp2 = rcl_ras
...         x = x + 1
...     else:
...         temp2 = arcpy.sa.Plus(temp2, out_ras1)
...         x = x + 1
...
0

Amph_Acris_crepitans

Runtime error <type 'exceptions.RuntimeError'>: ERROR 000871: G:\S2.GIS_PRODUCTION\E.USERS\Sarah\Converted Data\IUCN_Rasters.gdb\Amph_Acris_crepitans_rcl: Unable to delete the output ???????????????? .

Outcomes