Conditional with more than 4 arguments

Discussion created by hantschmann on Nov 13, 2012
Latest reply on Nov 13, 2012 by m.gasior
Dear users,

I used to run the following expressions in the rastercalculator up to ArcGIS9.3.1.

CON([nk] == 1 & [int] > 0 & [int] < 7, 2.59 * (2 * Sqr([int]) + 2 * [int]), [nk] == 2 & [int] > 0 & [int] < 7, 2.07 * (2 * Sqr([int]) + 2 * [int]), [nk] == 3 & [int] < 1 & [int] > 0, 2.00 * 10 * [int], [nk] == 3 & [int] >= 1, 20.0)

Now, with ArcGIS10 & Python I had to modify the expression. Which I did, but finally got told (error message by ArcGIS) that I can only use 4 arguments (but 8 given). Does anyone have a solution for that issue?

Here´s my modified expression:

Con(("nk" == 1) & ("int" > 0) & ("int" < 7), 2.59 * (2 * Square("int") + 2 * "int"), ("nk" == 2) & ("int" > 0) & ("int" < 7), 2.07 * (2 * Square("int") + 2 * "int"), ("nk" == 3) & ("int" < 1) & ("int" > 0), 2.00 * 10 * "int", ("nk" == 3) & ("int" >= 1), 20.0)

Any help would be appreciated.

Best regards,

Matthias