I've created a sub-model in ArcGIS, which stretches my raster data to new values.

The strange thing is, that the model works, if I run it itself - as soon as I implement it in the main model, I get this error message:

ERROR 000539: Error running expression: rcexec() Traceback (most recent call last): File "", line 1, in File "", line 5, in rcexec File "c:\program files (x86)\arcgis\desktop10.2\arcpy\arcpy\sa\Functions.py", line 244, in Con where_clause) File "c:\program files (x86)\arcgis\desktop10.2\arcpy\arcpy\sa\Utils.py", line 47, in swapper result = wrapper(*args, **kwargs) File "c:\program files (x86)\arcgis\desktop10.2\arcpy\arcpy\sa\Functions.py", line 238, in Wrapper where_clause) File "c:\program files (x86)\arcgis\desktop10.2\arcpy\arcpy\geoprocessing_base.py", line 498, in return lambda *args: val(*gp_fixargs(args, True)) RuntimeError: ERROR 010240: Could not save raster dataset to C:\Users\Mattias\Documents\01_UNI\Diplomarbeit\GIS\DATA\data_out\scratch_IV.gdb\plus_ras with output format FGDBR. Failed to execute (Raster Calculator).

In my opinion, there's nothing wrong with my syntax - else it would not work in the sub-model directly...

Anyway, my map algebra expression is:

Con("%to_be_stretched%","%min_r_raster%",Con("%to_be_stretched%","%max_r_raster%",((("%to_be_stretched%" * 1.0) - "%min_in_raster%") / ("%max_in_raster%" - "%min_in_raster%")) * ("%max_r_raster%" - "%min_r_raster%") + "%min_r_raster%","VALUE >= %max_in%"),"VALUE <= %min_in%")


I"m guessing the issue is the temp workspace.

Check that the file geodatabase "C:\Users\Mattias\Documents\01_UNI\Diplomarbeit\GIS\DATA\data_out\scratch_IV.gdb\plus_ras" exists.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.