Define Mosaic Dataset NoData (Data Management)
Summary
Allows you to specify one or more NoData values for a mosaic dataset.
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.
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.
Syntax
Parameter | Explanation | Data 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.
| Boolean |
Code Sample
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")
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)