How to change NoData cells to a value

Using the Is Null in conjunction with the Con tool, you can change NoData values on a raster to any desired value while retaining the original non-NoData values for the remaining cells.

For example, to create a raster where the NoData areas have been assigned to a particular value, such as 100, while the other (non-NoData) cells retain their values, the procedure would be as follows:

  1. Identify the NoData locations with the IsNull tool:
    • Input raster : InRas1

      Output raster : OutNullRas

  2. Use Con on the results to give the original NoData areas a value:
    • Input conditional raster : OutNullRas

      Expression : "Value = 1"

      Input true raster or constant value : 100

      Input false raster or constant value : InRas1

      Output raster : NullTo100_Ras

In the first step, IsNull gives the NoData areas a value of 1 and the non-NoData areas a value of 0. In the second step, for cells where the input conditional raster is true (value of 1), the output value is 100. For cells where the input conditional raster is false (value 0), the output is given the value of the original raster at that location.

Related Topics

4/10/2014