Simple Raster Calculator Problem

13377
2
09-25-2012 10:27 AM
BreeWitteveen
New Contributor II
I am trying to remove negative values in a depth raster that I created. I'm sure it's quite simple to do, but I'm new to using Raster Calculator and cannot seem to get the syntax right. What is the correct syntax for returning values greater than or equal to zero for a raster "depth_layer"?

Thanks!
2 Replies
MarcinGasior
Occasional Contributor III
If you want to turn values below 0 into NoData and leave the rest untouched try this expression in Raster Calculator:
SetNull("depth_layer" < 0, "depth_layer")

If you want to change values below 0 into some value (eg. 0) try this:
Con("depth_layer" < 0, 0,"depth_layer")

If you want to just see which values are below 0 use simply:
"depth_layer" < 0
ALI78671
New Contributor

Sir, i am applying your method of negative values to no data, it works, but the range of values to the positive side is increasing every time from 0 to some value higher than the original positive value of the raster file.

0 Kudos