Export Mosaic Dataset Items (Data Management)

Summary

Saves a copy of processed images in a mosaic dataset to a specified folder and raster file format.

The following are the two common workflows that use this tool:

  • Export each selected item of a mosaic dataset to a new file. This allows you to have each processed item as a stand-alone file. You must set the appropriate NoData value for the exported items so there are no dark borders.
  • Export each selected image within a time series mosaic dataset based on an area of interest. This allows you to only export the area of interest from each time slice.

Usage

  • By default, all items will be exported to the specified folder. Use the Query Definition parameter or interactively select specific records in the mosaic dataset to export a subset of the images.

  • The images will be exported with all the processing from the function chains applied. Only the function chains at the item level are applied; function chains at the mosaic dataset level are ignored. This tool does not export the raw source images.

Parameters

LabelExplanationData Type
Mosaic Dataset

The mosaic dataset that contains the images that will be exported.

Mosaic Layer
Output Folder

The folder where the images will be saved.

Folder
Output Base Name
(Optional)

A prefix that will be added to the name of each item after it is copied. The prefix will be followed by the Object ID value from the mosaic dataset footprints table.

If no base name is set, the text in the Name field of the mosaic dataset item will be used.

String
Query Definition
(Optional)

An SQL expression that will be used to save selected images in the mosaic dataset.

SQL Expression
Output Format
(Optional)

Specifies the format that will be used for the output raster datasets.

  • TIFFTIFF format will be used. This is the default.
  • Cloud Optimized GeoTIFFCloud Optimized GeoTIFF format will be used.
  • BMPBMP format will be used.
  • ENVI DATENVI DAT format will be used.
  • Esri BILEsri BIL format will be used.
  • Esri BIPEsri BIP format will be used.
  • Esri BSQEsri BSQ format will be used.
  • GIFGIF format will be used.
  • Esri GridEsri Grid format will be used.
  • ERDAS IMAGINEERDAS IMAGINE format will be used.
  • JPEG 2000JPEG 2000 format will be used.
  • JPEGJPEG format will be used.
  • PNGPNG format will be used.
  • Cloud raster formatCloud raster format will be used.
  • Meta raster formatMeta raster format will be used.
String
NoData Value
(Optional)

All the pixels with the specified value will be set to NoData in the output raster dataset.

It is recommended that you specify a NoData value if the output images will be clipped.

String
Clip Type
(Optional)

Specifies the output extent that will be used for the raster datasets. If you specify an extent or feature class that covers an area larger than the raster data, the output will have the larger extent.

  • No clippingThe output will not be clipped. This is the default.
  • Clip to extentAn extent will be used to clip the output.
  • Clip to feature classA feature class extent will be used to clip the output.
String
Clipping Template
(Optional)

The feature class or bounding box that will be used to limit the extent.

  • Current Display Extent Map View—The extent will be based on the active map or scene.
  • Draw Extent Square and Finish—The extent will be based on a rectangle drawn on the map or scene.
  • Extent of a Layer Layer—The extent will be based on an active map layer. Choose an available layer or use the Extent of data in all layers option. Each map layer has the following options:

    • All Features Select All—The extent of all features.
    • Selected Features Area from Selected Features—The extent of the selected features.
    • Visible Features Extent Indicator—The extent of visible features.

  • Browse Browse—The extent will be based on a dataset.
  • Clipboard Paste—The extent can be copied to and from the clipboard.
    • Copy Extent Copy—Copies the extent and coordinate system to the clipboard.
    • Paste Extent Paste—Pastes the extent and coordinate system from the clipboard. If the clipboard does not include a coordinate system, the extent will use the map’s coordinate system.
  • Reset Extent Reset—The extent will be reset to the default value.

When coordinates are manually provided, the coordinates must be numeric values and in the active map's coordinate system. The map may use different display units than the provided coordinates. Use a negative value sign for south and west coordinates.

Extent
Cell Size
(Optional)

The horizontal (x) and vertical (y) dimensions of the output cells.

If the cell size is not provided, the spatial resolution of the input will be used.

Point
Export images to image space
(Optional)

Specifies whether raster items will be exported in map space or image space.

  • Unchecked—Raster items will be exported in map space. This is the default.
  • Checked—Raster items will be exported in image space.

Boolean
Remove image distortions
(Optional)

Specifies whether lens distortion will be removed from the exported raster in image space.

  • Unchecked—Lens distortion will not be removed from the exported raster in image space. This is the default.
  • Checked—Lens distortion will be removed from the exported raster in image space.

Boolean
Band Method
(Optional)

Specifies the method that will be used to select bands.

This parameter is enabled when the Export images to image space parameter is checked.

  • All bandsAll bands will be exported. This is the default.
  • Band IDsBands will be exported based on the Band ID Selection parameter value.
  • Band namesBands will be exported based on the Band Name Selection parameter value.
String
Band Name Selection
(Optional)

The name of the band that will be exported from the input mosaic dataset.

This parameter is enabled when the Band Method parameter is set to Band names.

Value Table
Band ID Selection
(Optional)

The ID number of the band that will be exported from the input mosaic dataset.

This parameter is enabled when the Band Method parameter is set to Band IDs.

Value Table

Derived Output

LabelExplanationData Type
Updated Output Folder

The updated output folder.

Folder

arcpy.management.ExportMosaicDatasetItems(in_mosaic_dataset, out_folder, {out_base_name}, {where_clause}, {format}, {nodata_value}, {clip_type}, {template_dataset}, {cell_size}, {image_space}, {remove_distortion}, {band_method}, {band_name_selection}, {band_id_selection})
NameExplanationData Type
in_mosaic_dataset

The mosaic dataset that contains the images that will be exported.

Mosaic Layer
out_folder

The folder where the images will be saved.

Folder
out_base_name
(Optional)

A prefix that will be added to the name of each item after it is copied. The prefix will be followed by the Object ID value from the mosaic dataset footprints table.

If no base name is set, the text in the Name field of the mosaic dataset item will be used.

String
where_clause
(Optional)

An SQL expression that will be used to save selected images in the mosaic dataset. For more information about SQL syntax, see SQL reference for query expressions used in ArcGIS.

SQL Expression
format
(Optional)

Specifies the format that will be used for the output raster datasets.

  • TIFFTIFF format will be used. This is the default.
  • Cloud Optimized GeoTIFFCloud Optimized GeoTIFF format will be used.
  • BMPBMP format will be used.
  • ENVIENVI DAT format will be used.
  • Esri BILEsri BIL format will be used.
  • Esri BIPEsri BIP format will be used.
  • Esri BSQEsri BSQ format will be used.
  • GIFGIF format will be used.
  • GRIDEsri Grid format will be used.
  • IMAGINE IMAGEERDAS IMAGINE format will be used.
  • JP2JPEG 2000 format will be used.
  • JPEGJPEG format will be used.
  • PNGPNG format will be used.
  • CRFCloud raster format will be used.
  • MRFMeta raster format will be used.
String
nodata_value
(Optional)

All the pixels with the specified value will be set to NoData in the output raster dataset.

It is recommended that you specify a NoData value if the output images will be clipped.

String
clip_type
(Optional)

Specifies the output extent that will be used for the raster datasets. If you specify an extent or feature class that covers an area larger than the raster data, the output will have the larger extent.

  • NONEThe output will not be clipped. This is the default.
  • EXTENTAn extent will be used to clip the output.
  • FEATURE_CLASSA feature class extent will be used to clip the output.
String
template_dataset
(Optional)

The feature class or bounding box that will be used to limit the extent.

  • MAXOF—The maximum extent of all inputs will be used.
  • MINOF—The minimum area common to all inputs will be used.
  • DISPLAY—The extent is equal to the visible display.
  • Layer name—The extent of the specified layer will be used.
  • Extent object—The extent of the specified object will be used.
  • Space delimited string of coordinates—The extent of the specified string will be used. Coordinates are expressed in the order of x-min, y-min, x-max, y-max.
Extent
cell_size
(Optional)

The horizontal (x) and vertical (y) dimensions of the output cells.

If the cell size is not provided, the spatial resolution of the input will be used.

Point
image_space
(Optional)

Specifies whether raster items will be exported in map space or image space.

  • MAPSPACERaster items will be exported in map space. This is the default.
  • IMAGESPACERaster items will be exported in image space.
Boolean
remove_distortion
(Optional)

Specifies whether lens distortion will be removed from the exported raster in image space.

  • REMOVEDLens distortion will be removed from the exported raster in image space.
  • NOTREMOVELens distortion will not be removed from the exported raster in image space. This is the default.
Boolean
band_method
(Optional)

Specifies the method that will be used to select bands.

This parameter is enabled when the image_space parameter is set to IMAGESPACE.

  • ALL_BANDSAll bands will be exported. This is the default.
  • BAND_IDSBands will be exported based on the band_id_selection parameter value.
  • BAND_NAMESBands will be exported based on the band_name_selection parameter value.
String
band_name_selection
[band_name_selection,...]
(Optional)

The name of the band that will be exported from the input mosaic dataset.

This parameter is enabled when the band_method parameter is set to BAND_NAMES.

Value Table
band_id_selection
[band_id_selection,...]
(Optional)

The ID number of the band that will be exported from the input mosaic dataset.

This parameter is enabled when the band_method parameter is set to BAND_IDS.

Value Table

Derived Output

NameExplanationData Type
derived_out_folder

The updated output folder.

Folder

Code sample

ExportMosaicDatasetItems example 1 (Python window)

This is a Python sample for the ExportMosaicDatasetItems function.

import arcpy
arcpy.ExportMosaicDatasetItems_management(
     "c:/workspace/exportmditems.gdb/export_all_items", 
     "c:/workspace/export_all_items_out", 
     "allitems", "", "TIFF", "", "NONE", "", "")
ExportMosaicDatasetItems example 2 (stand-alone script)

This is a Python script sample for the ExportMosaicDatasetItems function.

#Export Mosaic Dataset items
                                                                       
import arcpy
arcpy.env.workspace = "c:/workspace"
    
#export mosaic dataset items using feature class as clipping extent
imdname = "exportmditem.gdb/exportmd" 
outfolder = "c:/workspace/outfolder"
basename = "Landsat8"
query = "OBJECTID = 1"
out_format = "TIFF"
nodata_value = "#"
cliptype = "FEATURE_CLASS"
clip_featureclass = "c:/workspace/featureclassdb.gdb/clip_FC"
cell_size = "#"

arcpy.ExportMosaicDatasetItems_management(imdname, outfolder, basename, 
     query, out_format, nodata_value, cliptype, clip_featureclass, cell_size)
ExportMosaicDatasetItems example 3 (Python window)

This is a Python script sample for the ExportMosaicDatasetItems function, using the band_id_selection parameter to select bands.

import arcpy
 
arcpy.management.ExportMosaicDatasetItems(in_mosaic_dataset=r"c:\workspace\exportmditems.gdb\ImageCollection", out_folder=r"C:\workspace\ExportMDItem", out_base_name="Band_ID", where_clause="", format="TIFF", nodata_value="", clip_type="NONE", template_dataset="DEFAULT", cell_size=None, image_space="IMAGESPACE", remove_distortion="REMOVED", band_method="BAND_IDS", band_name_selection= None, band_id_selection="1;2;3;4")