How to change cell values from NoData to Zero in ArcGIS
The number 1 reason why you may want to change NoData to zero is that it’s impossible to calculate a NoData value during a mathematical operation.
The way to convert NoData to zero for rasters in ArcGIS are:
- Reclassify Tool
- Con Tool
Let’s take a closer look at these two methods.
You can convert no data to zero by using the “Reclassify Tool”. This tool also requires the spatial analyst extension in ArcGIS.
This tool allows you to change old raster values to new raster values. The best part is that you can reclassify a range of values.
To go from no data to zero, enter “NoData” in the old value field, and enter a new value of zero.
*You may want to try the method above as the Con Tool may not return the correct output
With the spatial analyst extension, you can use the “Con Tool”, which stands for “conditional”. The Con Tool performs a conditional if statement evaluation on each grid cell of a raster dataset.
This function will allow you to replace NoData values with 0 values, with the condition “Value = NoData”.
The Reverse: Set Null Tool
Here’s an example of changing raster values to “NoData” using the Set Null Tool:
We have a flow direction raster data set. Let’s change all values of 4 to NoData. How would we do that?
Under Spatial Analyst Tools > Conditional, double-click the Set Null tool. The “Input Conditional Raster” will be the raster you want to set null. The “Input False Raster or Constant Value” will be the same. The expression will determine which values you will want to make null in your dataset.
Here’s an example of using the “Set Null” tool:
The result of using this tool will turn all values of 4 as “No Data” as seen below: