I am trying to add two conditional function (whatever value of raster fall between 0 and 1 range remain same other value replace by 0), so far i have i can put single condition only but i am trying to execute two function. . Below is my conditional statement script line.
outRaster = Con(localRaster <0.0, 0, localRaster)
Above code only can replace whatever raster value below 0 will replace by 0, but how to add this condition > 0.0 and < 1 remain same and other value replace by 0.
Solved! Go to Solution.
outRaster = Con(localRaster > 0.0, Con(localRaster < 1, localRaster, 0), 0)
if the localraster is > 0, then do a check to see if it is < 1. If it is <1, it will be >= 0 and < 1... sooo keep the value
If not... assign it 0, in both cases
outRaster = Con(localRaster > 0.0, Con(localRaster < 1, localRaster, 0), 0)
if the localraster is > 0, then do a check to see if it is < 1. If it is <1, it will be >= 0 and < 1... sooo keep the value
If not... assign it 0, in both cases
Dan Patterson. Thank you. Now Perfectly its working.