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

Dialog syntax

Scripting syntax

arcpy.env.nodata = "mapping_method"

Parameters

Explanation

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 your output have the same value range, then the NoData will be transferred over without any changes. However, if your value range changes, then 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_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_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 the 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 inside 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 inside the input's data range, the pixel depth will not be promoted for the output.

pyramid syntax
import arcpy

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

Related Topics

2/10/2014