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
arcpy.management.MergeMosaicDatasetItems(in_mosaic_dataset, {where_clause}, {block_field}, {max_rows_per_merged_items})
Parameter | Explanation | Data 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
Name | Explanation | Data Type |
out_mosaic_dataset | The updated mosaic dataset. | Mosaic Layer |
Code sample
This is a Python sample for the MergeMosaicDatasetItems tool.
import arcpy
arcpy.MergeMosaicDatasetItems_management("c:/data/merge_md_items.gdb/md",
"", "Year", "2000")
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
Licensing information
- Basic: No
- Standard: Yes
- Advanced: Yes