Delete Mosaic Dataset (Data Management)
Summary
Removes a mosaic dataset, its overviews, and its item cache from disk.
Usage
-
This tool is used to delete a mosaic dataset in its entirety, including any of the tables within the database and, optionally, any overviews or caches created with it.
You may not want to delete the overviews or cache when these are used in other mosaic datasets. The cache is usually created when LAS data, LAS datasets, or terrains are used in the mosaic dataset.
Syntax
Parameter | Explanation | Data Type |
in_mosaic_dataset |
The mosaic dataset that you want to delete from the geodatabase. | Mosaic Dataset ; Mosaic Layer |
delete_overview_images (Optional) | Choose whether to delete the overviews that are associated with the mosaic dataset.
| Boolean |
delete_item_cache (Optional) | Choose whether to delete the raster item cache that is associated with the mosaic dataset.
| Boolean |
Code Sample
This is a Python sample for the DeleteMosaicDataset tool.
import arcpy
arcpy.DeleteMosaicDataset_management(
"C:/Workspace/fileGDB.gdb/md2delete",
"DELETE_OVERVIEW_IMAGES", "NO_DELETE_ITEM_CACHE")
This is a Python script sample for the DeleteMosaicDataset tool.
#Delete mosaic dataset including the overview images
import arcpy
arcpy.env.workspace = "C:/Workspace"
mosaicds = "fileGDB.gdb/md2delete"
delOvr = "DELETE_OVERVIEW_IMAGES"
delCache = "NO_DELETE_ITEM_CACHE"
arcpy.DeleteMosaicDataset_management(mosaicds, delOvr, delCache)