Repair Mosaic Dataset Paths (Data Management)

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 significantly increase the size of a mosaic dataset. If the database size is large due to constant transactions, run the Compact tool.

Parameters

LabelExplanationData Type
Mosaic Dataset

The mosaic dataset with the broken paths.

Mosaic Layer
Paths List

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
Query Definition
(Optional)

An SQL expression to limit the repairs to selected rasters within the mosaic dataset.

SQL Expression

Derived Output

LabelExplanationData Type
Repaired Input Mosaic Dataset

The updated mosaic dataset.

Mosaic Layer

arcpy.management.RepairMosaicDatasetPaths(in_mosaic_dataset, paths_list, {where_clause})
NameExplanationData 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

NameExplanationData Type
out_mosaic_dataset

The updated mosaic dataset.

Mosaic Layer

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)

Licensing information

  • Basic: No
  • Standard: Yes
  • Advanced: Yes

Related topics