Define Mosaic Dataset NoData (Data Management)

License Level:BasicStandardAdvanced

Summary

Allows you to specify one or more NoData values for a mosaic dataset.

Usage

Syntax

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

Path and name of the mosaic dataset.

Mosaic Layer
num_bands

Defines the number of bands in the mosaic dataset.

This value will be populated automatically, based on the mosaic dataset that is added, but you can override it.

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)

The band number and the minimum and maximum pixel value of valid data. The NoData values will be those values outside the range. For example, for an 8-bit image, if you specify band1=10–200, then values 0–9 and 201–255 will be defined as NoData.

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
where_clause
(Optional)

Using SQL you can define a query or use the Query Builder to build a query.

SQL Expression
Composite_nodata_value
(Optional)

Choose whether all bands must be NoData in order for the pixel to be tagged 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

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

Related Topics

Licensing Information

ArcGIS for Desktop Basic: No
ArcGIS for Desktop Standard: Yes
ArcGIS for Desktop Advanced: Yes
5/7/2015