I’ve created a Submodel in ArcGIS, which stretches my rasterdata 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)arcgisdesktop10.2arcpyarcpysaFunctions.py”, line 244, in Con
where_clause)
File “c:program files (x86)arcgisdesktop10.2arcpyarcpysaUtils.py”, line 47, in swapper
result = wrapper(*args, **kwargs)
File “c:program files (x86)arcgisdesktop10.2arcpyarcpysaFunctions.py”, line 238, in Wrapper
where_clause)
File “c:program files (x86)arcgisdesktop10.2arcpyarcpygeoprocessing_base.py”, line 498, in
return lambda *args: val(*gp_fixargs(args, True))
RuntimeError: ERROR 010240: Could not save raster dataset to C:UsersMattiasDocuments1_UNIDiplomarbeitGISDATAdata_outscratch_IV.gdbplus_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 submodel 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%”)