I open Raster Calculator and run this:
SetNull("worldelvtn1ft.tif",1,"VALUE > 0") – sets everything less than 0 to 1
However, what I would like to do is set all the values from 0 to 50 as 1. i'm hoping there is a simple way of using the < > symbols but i can't figure out the right combination to make it work.
Also instead of setting it to 1 how do you set it to no data? The help on SetNull is vague and I really can't find a large list of examples.
Thanks!
Solved! Go to Solution.
I think "Con" might be a better way to go than "SetNull" for what you are trying to do.
You can run Con as a tool or in Raster Calculator.
Con can also be used like SetNull:
If no input false raster or constant is specified, NoData will be assigned to those cells that do not result in True from the expression.
Con (Spatial Analyst)
Chris Donohue, GISP
I think "Con" might be a better way to go than "SetNull" for what you are trying to do.
You can run Con as a tool or in Raster Calculator.
Con can also be used like SetNull:
If no input false raster or constant is specified, NoData will be assigned to those cells that do not result in True from the expression.
Con (Spatial Analyst)
Chris Donohue, GISP
Chris,
thank you for your reply! Con did work better.
I was able to set the range by using the following expression in Raster Calculator.
Con(("TargetRaster" < 0) & ("TargetRaster">-100),1)
This set everything from -100 to 0 as 1 and the rest of the raster was set to Null (No Data).
Dan
Glad to be of help.
Chris Donohue, GISP