Summary
Resets paths to source imagery if you have moved or copied a mosaic dataset.
Usage
You need to know the file path location in order to change it. You can use the Export Mosaic Dataset Paths tool to retrieve the original path names.
You can type an asterisk (*) as the original path if you wish to change all your paths.
Database fragmentation and frequent data manipulation can dramatically increase the size of your mosaic dataset. If your database size is inflated due to constant transactions, run the Compact tool.
Syntax
RepairMosaicDatasetPaths_management (in_mosaic_dataset, paths_list, {where_clause})
Parameter | Explanation | Data Type |
in_mosaic_dataset | The mosaic dataset with the broken paths. | Mosaic Layer |
paths_list [[original_path, {new_path}],...] | A list of the paths to remap. Include the current path stored in the mosaic dataset and the path to which it will be changed. You can enter an asterisk (*) as the original path if you wish to change all your paths. | Value Table |
where_clause (Optional) | An SQL expression to limit the repairs to selected rasters within the mosaic dataset. | SQL Expression |
Derived Output
Name | Explanation | Data Type |
out_mosaic_dataset |
Code sample
RepairMosaicDatasetPaths example 1 (Python window)
This is a Python sample for RepairMosaicDatasetPaths.
import arcpy
arcpy.RepairMosaicDatasetPaths_management(
"C:/Workspace/repairmd.gdb/md",
"\\\\server1\\md\\fgdb.gdb\\md c:\\storage\\md\\mdgdb.gdb\\md",
"#")
RepairMosaicDatasetPaths example 2 (stand-alone script)
This is a Python script sample for RepairMosaicDatasetPaths.
#Repair mosaic dataset paths
import arcpy
arcpy.env.workspace = "C:/Workspace"
mdname = "repairmd.gdb/md"
paths = "e:/temp/data c:/storage/mddata/e;d:/temp/data c:/storage/mddata/d"
query = "#"
arcpy.RepairMosaicDatasetPaths_management(mdname, paths, query)
Environments
This tool does not use any geoprocessing environments.
Licensing information
- ArcGIS Desktop Basic: No
- ArcGIS Desktop Standard: Yes
- ArcGIS Desktop Advanced: Yes