Quantcast
Channel: Question and Answer » arcpy
Viewing all articles
Browse latest Browse all 767

Error 010240 when calculating mean of a list of rasters – Cell Statistics

$
0
0

I’m trying to calulate the mean value of a list of rasters but I am always getting the following error:

RuntimeError: ERROR 010240: Could not save raster dataset to < value > with output format FGDBR.

The piece of code in question is the following:

arcpy.env.workspace = r"D:DocumentsAPLISRosario_1yrecharge.gdb"
re_list = arcpy.ListRasters()
re_mean = CellStatistics(re_list, "MEAN")
re_mean.save(r"D:DocumentsAPLISRosario_1yOutput.gdbre_sum")

I’ve been reading through different posts…
e.g. What causes RuntimeError: ERROR 010240 saving after CellStatistics?

…and tried setting a scratch workspace, saving the output to a different drive and I’ve also been running it on an external server cause I thought it might be due to missing memory capacity. Unfortunately it didn’t work.

At the moment I’m running the code on a list of only 365 rasters (1 year) but later I will have input data for 10 years or more so the list of rasters will become considerably longer. Maybe there is also a better way than using cell statistics to calculate the mean of all the rasters in the list?

Thanks for your help!


Viewing all articles
Browse latest Browse all 767

Trending Articles