Skip To Content

NoData (Environment setting)

Tools that honor the NoData environment setting will only process rasters where the NoData is valid.

Use this environment when the NoData value from your input needs to be transferred to your output raster. This setting allows you to specify which value you use to designate as the NoData value in your output.

Usage notes

  • When using the ArcGIS Spatial Analyst extension, NONE is the preferred mapping method to use. This produces the same behavior as previous versions of ArcGIS.
  • PROMOTION is the safest mapping method, since the NoData value will never be lost. However, promoting the pixel depth of your raster will create an output that is twice as large in size.

Dialog syntax

  • NoData—Choose which NoData mapping method to use.
    • None—There will not be any NoData value rules in place. If your input and output have the same value range, NoData will be transferred over without any changes. However, if your value range changes, there will be no value for NoData in your output. This is the default method.
    • Maximum—The maximum value in the output data range will be used as your NoData value.
    • Minimum—The minimum value in the output data range will be used as your NoData value.
    • Map values up—The lowest value in the range will be promoted and the lowest will become NoData. If the data is unsigned, the value of zero will become one, the NoData value will be zero, and the rest of the values remain the same. If the data is signed, the lowest value in the range will be promoted and the lowest will become NoData. For example, with 8-bit signed integer data, -127 will become -126, and the NoData value will be -127.
    • Map values down—The NoData value will be the maximum value in the data range, the highest value of the data range will become one value less, and the rest of the values remain the same. For example, with 8-bit unsigned integer data, the NoData value will be 255, the value of 255 will become 254, and the rest of the values will remain the same.
    • Promotion—If there is a NoData value outside the input's data range, the pixel depth of the output will be promoted to the next available level, and NoData will take the maximum value in the new data range. For example, an 8-bit unsigned integer dataset that requires the 256 value to be NoData will be promoted to a 16-bit dataset and the maximum value will become NoData. If there is a NoData value within the input's data range to be written to the output, or if there isn't any NoData, the pixel depth will not be promoted.

      If there is a NoData value outside of the input's data range, the pixel depth will be promoted to the next available level, and the Nodata value will be the one specified by the user. For example, an 8-bit unsigned integer dataset that requires 256 as NoData will be promoted to a 16-bit dataset and value 256 becomes the NoData value. If the NoData value specified is within the input's data range, the pixel depth will not be promoted for the output.

Scripting syntax

arcpy.env.nodata = "mapping_method"

ParametersExplanation

nodata

The NoData mapping technique used:

  • NoData—Choose which NoData mapping method to use.
    • None—There will not be any NoData value rules in place. If your input and output have the same value range, NoData will be transferred over without any changes. However, if your value range changes, there will be no value for NoData in your output. This is the default method.
    • Maximum—The maximum value in the output data range will be used as your NoData value.
    • Minimum—The minimum value in the output data range will be used as your NoData value.
    • Map values up—The lowest value in the range will be promoted and the lowest will become NoData. If the data is unsigned, the value of zero will become one, the NoData value will be zero, and the rest of the values remain the same. If the data is signed, the lowest value in the range will be promoted and the lowest will become NoData. For example, with 8-bit signed integer data, -127 will become -126, and the NoData value will be -127.
    • Map values down—The NoData value will be the maximum value in the data range, the highest value of the data range will become one value less, and the rest of the values remain the same. For example, with 8-bit unsigned integer data, the NoData value will be 255, the value of 255 will become 254, and the rest of the values will remain the same.
    • Promotion—If there is a NoData value outside the input's data range, the pixel depth of the output will be promoted to the next available level, and NoData will take the maximum value in the new data range. For example, an 8-bit unsigned integer dataset that requires the 256 value to be NoData will be promoted to a 16-bit dataset and the maximum value will become NoData. If there is a NoData value within the input's data range to be written to the output, or if there isn't any NoData, the pixel depth will not be promoted.

      If there is a NoData value outside of the input's data range, the pixel depth will be promoted to the next available level, and the Nodata value will be the one specified by the user. For example, an 8-bit unsigned integer dataset that requires 256 as NoData will be promoted to a 16-bit dataset and value 256 becomes the NoData value. If the NoData value specified is within the input's data range, the pixel depth will not be promoted for the output.

nodata syntax
import arcpy

# Set the nodata mapping method environment to promote the value.
arcpy.env.nodata = "PROMOTION"

Related topics