Select to view content in your preferred language

Con Statement issue in Raster Calculator

1710
2
Jump to solution
02-03-2016 01:03 PM
JayHalligan
New Contributor III

Can anyone solve this issue:

I need to create a new raster that will have 3 different values based on 2 other rasters.  Here is what I have:

Con((0.0005*"velocity"^3-0.0204*"velocity"^2-0.0094*"velocity"+5.9262)<"depth", 30, Con("depth"<(0.0002*"velocity"^3-0.0099*"velocity"^2-0.0337*"velocity"+2.9758), 20),10)

in short it should be something like this

con((equation)< depthraster,10, con(depthraster<(equation2), 20, 100))

So if equation 1 is less than the depth raster, make those values "10"

If Depth Raster is less than equation 2, make those values "20"

If neither are true, make those values "100"

I am only getting 2 out of the 3 values.  The values that are coming out as "10" are correct but there is no differentiation between the other two.

Tags (2)
0 Kudos
1 Solution

Accepted Solutions
DarrenWiens2
MVP Honored Contributor

I suspect it's because the ^ Map Algebra operator is Boolean XOr​ (unless that's what you wanted), not exponent. Use ** (Power) instead.

View solution in original post

2 Replies
DarrenWiens2
MVP Honored Contributor

I suspect it's because the ^ Map Algebra operator is Boolean XOr​ (unless that's what you wanted), not exponent. Use ** (Power) instead.

JayHalligan
New Contributor III

Wow, thanks so much, I have been trying everything and it didn't even cross my mind about the ^.  Worked like a charm!

0 Kudos