Error while creating slope

373
1
12-30-2011 01:53 AM
PetriLatva-Käyrä
New Contributor
Hi!

I'm creating slopes from DTMs as a batch process with python. I get really strange error.
When I do the process to a DTM file for the first time I get the error "arcgisscripting.ExecuteError: ERROR 010240: Could not save raster dataset to C:\ICIMOD\Slope\g_g_g2 with output format GRID. Failed to execute (Slope)."

BUT if I run the process again it goes through and creates the slope correctly but gives the same error for the second file in the batch. And again if the batch is run again, the second slope is created correctly and the error comes for the third file etc.

My python code is as follows:
for i in DTM:
IC_tif= "C:\\ICIMOD\\DTM\\ic0" + str(i) + ".tif"
IC_slope = "C:\\ICIMOD\\Slope\\IC0" + str(i) + "_slope"
gp.Slope_sa(IC_tif, IC_slope, "DEGREE", "0.001")


I have used the batch before and then it made about 20-30 files and then gave the error. I assume it's some kind of memory error.

Does anyone know I could get past this problem, because I don't want to restart the batch hundreds of times.

Thanks,

-Petri
0 Kudos
1 Reply
GayathriAlallasundaram
New Contributor III
Hi,

Please click on the below link which explains about the error 010240 : Could not save raster dataset. This may help you solve the issue.

http://help.arcgis.com/en/arcgisdesktop/10.0/help/index.html#//00vq00000009010240.htm


Regards,
Gayu
0 Kudos