Error 010240 when running Band Stats

2058
3
03-09-2011 09:00 AM
JessicaBerryman
New Contributor
I am trying to calculation the correlation coefficients for 26 environmental variables.  When I put in some of my rasters, I get the following error message.

ERROR 010240: Could not save raster dataset to E:\..... with output format GRID Stack 7.x.
Failed to execute (BandCollectionStats).

The rasters that are giving me trouble are clipped bioclim variables with roughly the properties below.  I was able to calculate the correlation coefficients for all 19 variables at once prior to altering the rasters, so I am guessing it has something to do with how I altered them.

Raster Information
Columns and Rows: 104400,39600
Number of Bands: 1
Cellsize (X,Y): (0.00027777778, 0.00027777778)
Uncompressed Size: 7.70 GB
Format: GRID
Source Type: continuous
Pixel Type: unsigned integer
Pixel depth: 16 Bit
NoData Value: 0
Colormap: absent
Pyramids: absent
Compression: Default
Status: Permanent

Any suggestions on how to correct this problem would be very much appreciated.

Cheers,
   Jessica
0 Kudos
3 Replies
MikeMann
New Contributor
I am having the same trouble when trying to araster.save anything from python.  I have tried setting arcpy.OverwriteOutput = True, setting up an empty scratch folder, writing to various formats (grid, tif).


Starting to think this is a bug, but why aren't more people complaining about it?
0 Kudos
curtvprice
MVP Esteemed Contributor
I am trying to calculation the correlation coefficients for 26 environmental variables. When I put in some of my rasters, I get the following error message. 

ERROR 010240: Could not save raster dataset to E:\.....
with output format GRID Stack 7.x.
Failed to execute (BandCollectionStats).



1. It could be a path name issue

The output grid stack name must be short (<10 characters), must start with a letter, and must not contain any non alphanumeric characters except "_". This is a limitation of the Esri grid format. (The extra-short 10 characters is because a grid stack needs to create output grid names <gridname>_c1, etc.).

It's possible that some older and little-used tools may still need to write to the grid format as an intermediate step even if the destination is a tiff, so these naming limits may apply even for tiff output in this case.

There are bugs sometimes if the path itself contains spaces or special characters, but these issues are becoming more rare with each version of ArcGIS. Encapsulating paths within the raster object at 10.x helped a lot with this.

2. There may be a file size problem with the raster table COUNT for a value.

If an integer raster exceeds the 2.1G limit of COUNT for a values in an integer raster table, the raster attribute table build will fail. This usually brings up a different error message, but it's another possibility. This is a hard limit and you may need to tile your data to get it to work. The way to check this is to process a smaller area of the raster (by setting a limited geoprocessing extent) and seeing if it works with a smaller output. This is always a good idea when working out a complex processing chain so you don't have to wait a long time for tools to run that are just going to crash because of some issue you must resolve. When it's all working, you can just reset the extent and run it "for real".

Another useful tip - especially when processing large rasters, set the output and scratch workspace to the same location (preferably a folder so the tired-and-true grid format is used). When a tool completes, the output raster can then be renamed instead of copied from scratch to current workspace paths.
0 Kudos
MikeMann
New Contributor
Pretty sure that those don't apply in my case.  Want to take a look at this thread

http://gis.stackexchange.com/questions/58816/problem-saving-after-cellstatistics-list-error-010240

Curious if you can help.
0 Kudos