I am receiving the following error when trying to run the following code:
import arcpy
from arcpy import env
from arcpy.sa import *
arcpy.CheckOutExtension = "Spatial"
env.workspace = r"C:\final_mosaic_files\for_python"
Z3 = Raster("mos_zb3")
Z4 = Raster("mos_zb4")
PC2 = Raster("pca_finb2")
outCon = Con(Z4 < -0.9274,2, Con(Z3 <-0.6223,2, Con(PC2 > 1.13,2, Con(Z3 <-0.05342,2,1))))
outCon.save(r"C:\classifications\actual_real_deal\CART")
The error is:
RuntimeError: ERROR 010240: Could not save raster dataset to C:\Users\User\Documents\Mo with output format GRID.
I have tried changing the destination folder, and the file does not currently exist in the directory, and the values of the raster are within GRID parameters for the type of format. The input rasters are mosaics of z-score values of 12 landsat images delineating coastal marsh in the northeast. The cell size is 30X30m, using WGS1984 coordinate system, no projection system. I have tried running the script with .tif file format instead of GRID, which does not work, throwing another error (file Z3 does not exist or is not supported). I have also tried running the script with other, smaller GRID files, which throws the same error 010240.
PC2is 9 characters long (with a limit of 8)? I just had this very problem and I think that might have been my issue. – Chad Cooper Nov 05 '13 at 21:43