Repair Trajectory Dataset Paths (Data Management)

Summary

Repairs paths to source data for a trajectory dataset.

Usage

  • Trajectory datasets reference external files. When the referenced data is moved, the paths must be repaired to update the new reference location.

  • To change all of the paths in the trajectory dataset, use an asterisk (*) as the original path for the Paths List parameter.

Parameters

LabelExplanationData Type
Trajectory Dataset

The input trajectory dataset.

Trajectory Layer
Paths List

A list of paths to remap.

Value Table
Query Definition
(Optional)

An SQL expression that will limit the repairs to selected items in the trajectory dataset.

SQL Expression

Derived Output

LabelExplanationData Type
Trajectory Dataset Name

The updated trajectory dataset.

Trajectory Layer

arcpy.management.RepairTrajectoryDatasetPaths(in_trajectory_dataset, paths_list, {where_clause})
NameExplanationData Type
in_trajectory_dataset

The input trajectory dataset.

Trajectory Layer
paths_list
[paths_list,...]

A list of paths to remap.

Value Table
where_clause
(Optional)

An SQL expression that will limit the repairs to selected items in the trajectory dataset.

SQL Expression

Derived Output

NameExplanationData Type
out_trajectory_dataset

The updated trajectory dataset.

Trajectory Layer

Code sample

RepairTrajectoryDatasetPaths example 1 (stand-alone script)

This example repairs a specified path in a trajectory dataset.

# Import system modules
import arcpy
from arcpy.ia import *

# Set local variables
in_trajectory_dataset = r"C:\temp\trajectory_data.gdb\trajectory_dataset"
paths_list = r"C:\Data\Altimetry C:\Data\Cryosat"
where_clause = ""

# Execute
repair_output = arcpy.management.RepairTrajectoryDatasetPaths(in_trajectory_dataset, paths_list , where_clause)
RepairTrajectoryDatasetPaths example 2 (stand-alone script)

This example repairs all paths in a trajectory dataset using a query expression.

# Import system modules
import arcpy
from arcpy.ia import *

# Set local variables
in_trajectory_dataset = r"C:\temp\trajectory_data.gdb\trajectory_dataset"
paths_list = "* C:\data\CryoSat"
where_clause = "OBJECTID<2"


# Execute
repair_output = arcpy.management.RepairTrajectoryDatasetPaths(in_trajectory_dataset, paths_list, where_clause)

Related topics