Skip To Content

Merge Mosaic Dataset Items

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.

Syntax

MergeMosaicDatasetItems_management (in_mosaic_dataset, {where_clause}, {block_field}, {max_rows_per_merged_items})
ParameterExplanationData Type
in_mosaic_dataset

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

Image Service; Mosaic Layer; String
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

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.

Licensing information

  • ArcGIS Desktop Basic: No
  • ArcGIS Desktop Standard: Yes
  • ArcGIS Desktop Advanced: Yes