How to use Set Null in Model Builder?

1690
2
08-11-2017 09:30 AM
AndrewMartin8
New Contributor III

I am trying to emulate the raster calculator that takes a flow accumulation raster and turns it into a stream raster. Where the number "849840" is the threshold value.

How would I use the Set Null tool in the model builder that will give me the same results?

What would I put in the fields?

0 Kudos
2 Replies
ChrisDonohue__GISP
MVP Alum

If I remember correctly, SetNull (Spatial Analyst) would be done like this to complete your task:

The Input Conditional Rasterdem_fa (your source raster to operate on)

Expression (optional) would be:  VALUE > 849840 .  (values above 849840 are evaluated by the tool as True, so will become Null)

Input File raster or constant value: 1 .  (constant value to set if False/Not Null, ie your streams will have a value of 1)

Output raster:  (your output file name goes here)

Note:  be sure to set the Environments (button at bottom of tool).  Also, I would avoid using the Default Geodatabase (Default.gdb) and instead set up a geodatabase specifically for this data and its processing.

Chris Donohue, GISP

curtvprice
MVP Esteemed Contributor

Alternatively, you can add the Raster Calculator tool in Model Builder and use it the same way you used it interactively.