Merge Mosaic Dataset Items (Data Management)

Summary

Groups multiple items in a mosaic dataset together as one item.

Usage

  • Selections and queries should be used to choose the mosaic dataset items to merge. If a block field is also specified, the tool will take the results of the selection and merge all the similar block fields into separate rows.

  • The default number of maximum allowed items per merge is 1,000. If the maximum is exceeded, the tool will insert additional merged items for the selection or query. For example, if 2,000 items are selected, the tool will create two merged items.

Parameters

LabelExplanationData Type
Mosaic Dataset

The mosaic dataset that has the items that you want to merge.

Mosaic Layer
Query Definition
(Optional)

An SQL expression to select specific rasters to merge in the mosaic dataset.

SQL Expression
Block Field
(Optional)

The field in the attribute table that you want to use to group images. Only date, numeric, and string fields can be specified as Block fields.

Field
Maximum Allowed Rows Per Merged Item
(Optional)

Limits the number of items to merge. If the maximum is exceeded, the tool will create multiple merged items. The default is 1,000 rows.

Long

Derived Output

LabelExplanationData Type
Updated Mosaic Dataset

The updated mosaic dataset.

Mosaic Layer

arcpy.management.MergeMosaicDatasetItems(in_mosaic_dataset, {where_clause}, {block_field}, {max_rows_per_merged_items})
NameExplanationData Type
in_mosaic_dataset

The mosaic dataset that has the items that you want to merge.

Mosaic Layer
where_clause
(Optional)

An SQL expression to select specific rasters to merge in the mosaic dataset.

SQL Expression
block_field
(Optional)

The field in the attribute table that you want to use to group images. Only date, numeric, and string fields can be specified as Block fields.

Field
max_rows_per_merged_items
(Optional)

Limits the number of items to merge. If the maximum is exceeded, the tool will create multiple merged items. The default is 1,000 rows.

Long

Derived Output

NameExplanationData Type
out_mosaic_dataset

The updated mosaic dataset.

Mosaic Layer

Code sample

MergeMosaicDatasetItems example 1 (Python window)

This is a Python sample for the MergeMosaicDatasetItems tool.

import arcpy
arcpy.MergeMosaicDatasetItems_management("c:/data/merge_md_items.gdb/md",
                                         "", "Year", "2000")
MergeMosaicDatasetItems example 2 (stand-alone script)

This is a Python script sample for the MergeMosaicDatasetItems tool.

#Merge items with items that are newer than year 1999

import arcpy
    
arcpy.MergeMosaicDatasetItems_management(
    "c:/data/merge_md_items.gdb/md", "Year>1999", "", "1000")

Environments

This tool does not use any geoprocessing environments.