I am experiencing a problem with the raster calculator in the ModelBuilder under ArcMap 10.
I need to combine two layers:
- a drainage map (issued from a series of previous operations on a DEM) and
- a slope map reclassed in 8 classes.
The formula used in the calculator is the following:
Con(("surf_drainee" > 12) & ("surf_drainee" <= 80) & ("pente_rclass" <= 24),"pente_rclass"+1, Con(("surf_drainee" > 20) & ("pente_rclass" < 24),"pente_rclass" + 2, Con(("surf_drainee" > 80) & ("pente_rclass" == 24), "pente_rclass" + 1, "pente_rclass")))
When I enter this in the calculator, using the buttons to enter the expression, it sends back a python syntax error. I discussed it with a colleague, who told me to write it out completely with the keyboard.
This works in the Raster Calculator, when used alone from the Toolbox. But when this is done in the ModelBuilder, it does not connect my two layers to the calculator, but creates numerous duplicates in entry to the calculator (pente_rclass (2), pente_rclass (3)...).
Is there a way of getting around this problem? I was thinking maybe a script could replace the raster calculator, but I don't really have the knowledge to set that up without a few hints.