Define Mosaic Dataset NoData (Data Management)

Summary

Specifies one or more values to be represented as NoData.

Usage

  • NoData can be used to define pixel values that surround an image; however, the mosaic dataset can be made more efficient if the footprints are recomputed to remove these boundary areas. To recompute the footprints you can edit them manually or use the Build Footprints tool.

  • You can specify multiple NoData values with the Bands For NoData Value parameter. Use a space delimiter between each value you want to define as NoData.

  • This tool inserts the Mask function within the function chain for each raster item within a mosaic dataset.

Syntax

DefineMosaicDatasetNoData(in_mosaic_dataset, num_bands, {bands_for_nodata_value}, {bands_for_valid_data_range}, {where_clause}, {Composite_nodata_value})
ParameterExplanationData Type
in_mosaic_dataset

The mosaic dataset where you want to update the NoData values.

Mosaic Layer
num_bands

The number of bands in the mosaic dataset.

Long
bands_for_nodata_value
[band {NoData value},...]
(Optional)

Define values for each or all bands. Each band can have a unique NoData value defined, or the same value can be specified for all bands. If you want to define multiple NoData values for each band selection, use a space delimiter between each NoData value within the bands_for_nodata_value parameter.

The Mask function inserted by this tool is inserted before the Composite Bands function in the function chain. Therefore, if the function chain for each raster within the mosaic dataset contains the Composite Bands function, or if your raster data was added with a raster type that adds the Composite Bands function to each raster’s function chain, then any value you specify will apply to all bands.

Value Table
bands_for_valid_data_range
[band {minimum value} {maximum value},...]
(Optional)

Specify a range of values to display for each band. Values outside of this range will be classified as NoData. When working with composite bands, the range will apply to all bands.

Value Table
where_clause
(Optional)

An SQL statement to select specific raster in the mosaic dataset. Only the selected rasters will have their NoData values changed.

SQL Expression
Composite_nodata_value
(Optional)

Choose whether all bands must be NoData in order for the pixel to be classified as NoData.

  • NO_COMPOSITE_NODATAIf any of the bands have pixels of NoData, then the pixel is classified as NoData. This is the default.
  • COMPOSITE_NODATAAll of the bands must have pixels of NoData in order for the pixel to be classified as NoData.
Boolean

Derived Output

NameExplanationData Type
out_mosaic_dataset

The updated mosaic dataset.

Mosaic Layer

Code sample

DefineMosaicDatasetNoData example 1 (Python window)

This is a Python sample for DefineMosaicDatasetNoData.

import arcpy
arcpy.DefineMosaicDatasetNodata_management(
     "c:/workspace/Nodata.gdb/md", "3",  "ALL_BANDS '0 9'", "#", 
     "OBJECTID=2",  "COMPOSITE_NODATA")
DefineMosaicDatasetNoData example 2 (stand-alone script)

This is a Python script sample for DefineMosaicDatasetNoData.

#Specify multiple Nodata values for all bands in one Catalog item

import arcpy
arcpy.env.workspace = "C:/Workspace"

mdname = "Nodata.gdb/md"
noofbands = "3"
nodataval = "ALL_BANDS '0 9'"
nodatarange = "#"
query = "OBJECTID=2"
mode = "#"

arcpy.DefineMosaicDatasetNoData_management(mdname, noofbands, nodataval, 
                                           nodatarange, query, mode)

Environments

Licensing information

  • Basic: No
  • Standard: Yes
  • Advanced: Yes

Related topics