Remove Rasters From Mosaic Dataset (Data Management)

License Level:BasicStandardAdvanced

Summary

Removes selected rasters (items) from a mosaic dataset.

Usage

Syntax

RemoveRastersFromMosaicDataset_management (in_mosaic_dataset, {where_clause}, {update_boundary}, {mark_overviews_items}, {delete_overview_images}, {delete_item_cache}, {remove_items}, {update_cellsize_ranges})
ParameterExplanationData Type
in_mosaic_dataset

Path and name of mosaic dataset.

Mosaic Layer
where_clause
(Optional)

Using SQL you can define a query, or use the Query Builder to build a query to define the raster datasets that will be removed from the mosaic dataset.

There must be a selection or a query specified; otherwise, the tool will not run. If you want to delete all the records from the mosaic dataset, specify a query that would select all the rasters, such as "OBJECTID>=0".

SQL Expression
update_boundary
(Optional)

Updates the boundary polygon of a mosaic dataset. By default, the boundary merges all the footprint polygons to create a single boundary representing the extent of the valid pixels.

  • UPDATE_BOUNDARYThe boundary will be updated. This is the default.
  • NO_BOUNDARY The boundary will not be updated.
Boolean
mark_overviews_items
(Optional)

When the rasters in a mosaic catalog have been removed, any overviews created using those rasters may no longer be accurate; therefore, they can be identified so they can be updated or removed if they are no longer needed.

  • MARK_OVERVIEW_ITEMSThe affected overviews will be identified. This is the default.
  • NO_MARK_OVERVIEW_ITEMSThe affected overviews will not be identified.
Boolean
delete_overview_images
(Optional)

Any overviews that are no longer required as a result of the source rasters being removed can also be removed from the mosaic dataset. The overviews are removed only when the overview items are selected.

  • DELETE_OVERVIEW_IMAGESThe nonrequired overviews will be deleted only if the overview items are selected. This is the default.
  • NO_DELETE_OVERVIEW_IMAGES The overviews will not be deleted.
Boolean
delete_item_cache
(Optional)

Choose whether to delete the cache that is associated with any of the mosaic dataset items that you are removing.

  • DELETE_ITEM_CACHEThe mosaic dataset item will be removed and the corresponding cache will be deleted. This is the default.
  • NO_DELETE_ITEM_CACHEAny associated item cache will not be deleted.
Boolean
remove_items
(Optional)

Choose whether to delete the item from the mosaic dataset, such as a raster dataset, or only delete the associated overviews or cache.

  • REMOVE_MOSAICDATASET_ITEMSThe item will be removed from the mosaic dataset. This is the default.
  • NO_REMOVE_MOSAICDATASET_ITEMSThe item will not be removed from the mosaic dataset, but the item's cache and any overviews created from this item will be removed.
Boolean
update_cellsize_ranges
(Optional)

Choose whether to update the cell size ranges for the mosaic dataset.

  • UPDATE_CELL_SIZESThe cell size ranges will be updated. This is the default.
  • NO_CELL_SIZESThe cell size ranges will not be modified.
Boolean

Code Sample

RemoveRastersFromMosaicDataset example 1 (Python window)

This is a Python sample for RemoveRastersFromMosaicDataset.

import arcpy
arcpy.RemoveRastersFromMosaicDataset_management(
     "C:/Workspace/remove.gdb/md", "YEAR<1999", "UPDATE_BOUNDARY", 
     "MARK_OVERVIEW_ITEMS",  "#", "#", "#", "#")
RemoveRastersFromMosaicDataset example 2 (stand-alone script)

This is a Python script sample for RemoveRastersFromMosaicDataset.

#Delete Overviews with Query

import arcpy
arcpy.env.workspace = "C:/Workspace"

mdname = "remove.gdb/md2"
query = "#"
updatebnd = "#"
markovr = "#"
delovr = "DELETE_OVERVIEW_IMAGES"
delitemcache = "#"
removeitem = "NO_REMOVE_MOSAICDATASET_ITEMS"
updatecs = "UPDATE_CELL_SIZES"

arcpy.RemoveRastersFromMosaicDataset_management(
     mdname, query, updatebnd, markovr, delovr, delitemcache, 
     removeitem, updatecs)

Environments

Related Topics

Licensing Information

ArcGIS for Desktop Basic: No
ArcGIS for Desktop Standard: Yes
ArcGIS for Desktop Advanced: Yes
5/7/2015