Modify LRS (Location Referencing)

Summary

Modifies an existing linear referencing system (LRS) in the specified workspace.

Usage

  • This tool can be used on a feature class or table with or without geometry or records.

  • The route ID and centerline ID must be unique; however, the tool does not check for duplicate IDs.

  • This tool does not check for erroneous network IDs; if the network ID does not exist, it is considered erroneous.

  • Learn more about configuring LRS and field properties in the ArcGIS Pipeline Referencing LRS data model or ArcGIS Roads and Highways LRS data model.

  • The Realign Overlaps rule for event behavior supported in Roads and Highways in ArcMap is not supported in ArcGIS Pro.

    If event behaviors were configured in ArcMap using the Realign Overlaps rule, substitutions will be made using comparable Realign event behavior values.

    This tool will check for conflicting Realign and Realign Overlaps event behaviors and will support Realign event behavior if Realign Overlaps event behavior is encountered. This tool does not support Realign Overlaps event behavior.

    Note:

    The Snap option supported in ArcMap is supported for Realign event behavior in ArcGIS Pro 2.9 or later.

    The following table lists the resulting value in ArcGIS Pro for configured Realign and Realign Overlaps event behavior in an LRS migrated from ArcMap:

    If Realign in ArcMap isAnd Realign Overlaps in ArcMap isRealign in ArcGIS Pro will be

    Stay Put

    Move

    Stay Put

    Stay Put

    Retire

    Stay Put

    Stay Put

    Cover

    Stay Put

    Stay Put

    Snap

    Snap

    Move

    Stay Put

    Move

    Move

    Retire

    Move

    Move

    Cover

    Move

    Move

    Snap

    Snap

    Retire

    Stay Put

    Retire

    Retire

    Move

    Retire

    Retire

    Cover

    Retire

    Retire

    Snap

    Snap

    Cover

    Stay Put

    Cover

    Cover

    Move

    Cover

    Cover

    Retire

    Cover

    Cover

    Snap

    Cover

Parameters

LabelExplanationData Type
Input Workspace

The LRS workspace.

Workspace
Current LRS Name

The name of the current LRS.

String
New LRS Name
(Optional)

The new name of the current LRS.

String
Centerline - Feature Class
(Optional)

An existing centerline feature class for the minimum schema.

Feature Layer
Centerline - Centerline ID Field
(Optional)

The name of the centerline ID field from the Centerline - Feature Class parameter value.

Field
Centerline Sequence - Table
(Optional)

An existing centerline sequence table for the minimum schema.

Table View
Centerline Sequence - Centerline ID Field
(Optional)

The name of the centerline ID field from the Centerline Sequence - Table parameter value.

Field
Centerline Sequence - Route ID Field
(Optional)

The name of the route ID field from the Centerline Sequence - Table parameter value.

Field
Centerline Sequence - From Date Field
(Optional)

The name of the from date field from the Centerline Sequence - Table parameter value.

Field
Centerline Sequence - To Date Field
(Optional)

The name of the to date field from the Centerline Sequence - Table parameter value.

Field
Centerline Sequence - Network ID Field
(Optional)

The name of the network ID field from the Centerline Sequence - Table parameter value.

Field
Calibration Point - Feature Class
(Optional)

An existing calibration point feature class for the minimum schema.

Feature Layer
Calibration Point - Measure Field
(Optional)

The name of the measure field from the Calibration Point - Feature Class parameter value.

Field
Calibration Point - From Date Field
(Optional)

The name of the from date field from the Calibration Point - Feature Class parameter value.

Field
Calibration Point - To Date Field
(Optional)

The name of the to date field from the Calibration Point - Feature Class parameter value.

Field
Calibration Point - Route ID Field
(Optional)

The name of the route ID field from the Calibration Point - Feature Class parameter value.

Field
Calibration Point - Network ID Field
(Optional)

The name of the network ID field from the Calibration Point - Feature Class parameter value.

Field
Redline - Feature Class
(Optional)

An existing redline feature class for the minimum schema.

Feature Layer
Redline - From Measure Field
(Optional)

The name of the from measure field from the Redline - Feature Class parameter value.

Field
Redline - To Measure Field
(Optional)

The name of the to measure field from the Redline - Feature Class parameter value.

Field
Redline - Route ID Field
(Optional)

The name of the route ID field from the Redline - Feature Class parameter value.

Field
Redline - Route Name Field
(Optional)

The name of the route name field from the Redline - Feature Class parameter value.

Field
Redline - Effective Date Field
(Optional)

The name of the effective date field from the Redline - Feature Class parameter value.

Field
Redline - Activity Type Field
(Optional)

The name of the activity type field from the Redline - Feature Class parameter value.

Field
Redline - Network ID Field
(Optional)

The name of the network ID field from the Redline - Feature Class parameter value.

Field
Conflict Prevention
(Optional)

Specifies whether conflict prevention will be enabled for the input LRS. Conflict prevention is only available when editing or performing geoprocessing on branch versioned data that is published as a feature service.

  • As isThe current conflict prevention setting will be used. This is the default.
  • EnableConflict prevention will be enabled for the input LRS.
  • DisableConflict prevention will be disabled for the input LRS.
String
Move required feature classes to feature dataset
(Optional)

Specifies whether feature classes will be moved to the required LRS feature dataset.

  • Checked—Feature classes will be moved to the required LRS feature dataset.
  • Unchecked—Feature classes will not be moved to the required LRS feature dataset. This is the default.
Boolean

Derived Output

LabelExplanationData Type
Updated Input Workspace

The updated LRS workspace string.

Workspace

arcpy.locref.ModifyLRS(in_workspace, current_lrs_name, {new_lrs_name}, {centerline_feature_class}, {centerline_centerline_id_field}, {centerline_sequence_table}, {centerline_sequence_centerline_id_field}, {centerline_sequence_route_id_field}, {centerline_sequence_from_date_field}, {centerline_sequence_to_date_field}, {centerline_sequence_network_id_field}, {calibration_point_feature_class}, {calibration_point_measure_field}, {calibration_point_from_date_field}, {calibration_point_to_date_field}, {calibration_point_route_id_field}, {calibration_point_network_id_field}, {redline_feature_class}, {redline_from_measure_field}, {redline_to_measure_field}, {redline_route_id_field}, {redline_route_name_field}, {redline_effective_date_field}, {redline_activity_type_field}, {redline_network_id_field}, {conflict_prevention}, {move_to_feature_dataset})
NameExplanationData Type
in_workspace

The LRS workspace.

Workspace
current_lrs_name

The name of the current LRS.

String
new_lrs_name
(Optional)

The new name of the current LRS.

String
centerline_feature_class
(Optional)

An existing centerline feature class for the minimum schema.

Feature Layer
centerline_centerline_id_field
(Optional)

The name of the centerline ID field from the centerline_feature_class parameter value.

Field
centerline_sequence_table
(Optional)

An existing centerline sequence table for the minimum schema.

Table View
centerline_sequence_centerline_id_field
(Optional)

The name of the centerline ID field from the centerline_sequence_table parameter value.

Field
centerline_sequence_route_id_field
(Optional)

The name of the route ID field from the centerline_sequence_table parameter value.

Field
centerline_sequence_from_date_field
(Optional)

The name of the from date field from the centerline_sequence_table parameter value.

Field
centerline_sequence_to_date_field
(Optional)

The name of the to date field from the centerline_sequence_table parameter value.

Field
centerline_sequence_network_id_field
(Optional)

The name of the network ID field from the centerline_sequence_table parameter value.

Field
calibration_point_feature_class
(Optional)

An existing calibration point feature class for the minimum schema.

Feature Layer
calibration_point_measure_field
(Optional)

The name of the measure field from the calibration_point_feature_class parameter value.

Field
calibration_point_from_date_field
(Optional)

The name of the from date field from the calibration_point_feature_class parameter value.

Field
calibration_point_to_date_field
(Optional)

The name of the to date field from the calibration_point_feature_class parameter value.

Field
calibration_point_route_id_field
(Optional)

The name of the route ID field from the calibration_point_feature_class parameter value.

Field
calibration_point_network_id_field
(Optional)

The name of the network ID field from the calibration_point_feature_class parameter value.

Field
redline_feature_class
(Optional)

An existing redline feature class for the minimum schema.

Feature Layer
redline_from_measure_field
(Optional)

The name of the from measure field from the redline_feature_class parameter value.

Field
redline_to_measure_field
(Optional)

The name of the to measure field from the redline_feature_class parameter value.

Field
redline_route_id_field
(Optional)

The name of the route ID field from the redline_feature_class parameter value.

Field
redline_route_name_field
(Optional)

The name of the route name field from the redline_feature_class parameter value.

Field
redline_effective_date_field
(Optional)

The name of the effective date field from the redline_feature_class parameter value.

Field
redline_activity_type_field
(Optional)

The name of the activity type field from the redline_feature_class parameter value.

Field
redline_network_id_field
(Optional)

The name of the network ID field from the redline_feature_class parameter value.

Field
conflict_prevention
(Optional)

Specifies whether conflict prevention will be enabled for the input LRS. Conflict prevention is only available when editing or performing geoprocessing on branch versioned data that is published as a feature service.

  • AS_ISThe current conflict prevention setting will be used. This is the default.
  • ENABLEConflict prevention will be enabled for the input LRS.
  • DISABLEConflict prevention will be disabled for the input LRS.
String
move_to_feature_dataset
(Optional)

Specifies whether feature classes will be moved to the required LRS feature dataset.

  • DO_NOT_MOVEFeature classes will not be moved to the required LRS feature dataset. This is the default.
  • MOVEFeature classes will be moved to the required LRS feature dataset.
Boolean

Derived Output

NameExplanationData Type
out_workspace

The updated LRS workspace string.

Workspace

Code sample

ModifyLRS example 1 (Python window)

The following script demonstrates how to use the ModifyLRS function in the Python window.

# tool variables
input_workspace = r"c:\ModifyLRS\Py\ModifyLRS_python.gdb"
current_lrs_name = "LRS1"
new_lrs_name = "NewLRS"
centerline_feature_class = r"c:\ModifyLRS\Py\ModifyLRS_python.gdb\centerline1"
centerline_centerline_ID_field = "centerlineId"
centerline_sequence_table = r"c:\ModifyLRS\Py\ModifyLRS_python.gdb\centerline_Sequence1"
centerline_sequence_centerline_id_field = "centerlineId"
centerline_sequence_route_id_field = "RouteId"
centerline_sequence_from_date_field = "FromDate"
centerline_sequence_to_date_field = "ToDate"
centerline_sequence_network_ID_field = "NetworkId"
calibration_point_feature_class = r"c:\ModifyLRS\Py\ModifyLRS_python.gdb\calibration_Point1"
calibration_point_measure_field = "Measure"
calibration_point_from_date_field = "FromDate"
calibration_point_to_date_field = "ToDate"
calibration_point_route_id_field = "RouteId"
calibration_point_network_ID_field = "NetworkId"
redline_feature_class = r"c:\ModifyLRS\Py\ModifyLRS_python.gdb\Redline1"
redline_from_measure_field = "FromMeasure"
redline_to_measure_field = "ToMeasure"
redline_route_id_field = "RouteId"
redline_route_name_field = "RouteName"
redline_effective_date_field = "EffectiveDate"
redline_activity_type_field = "ActivityType"
redline_network_id_field = "NetworkId"

# set current workspace
arcpy.env.workspace = r"c:\ModifyLRS\Py\ModifyLRS_python.gdb"

# execute the tool
arcpy.ModifyLRS_locref(in_workspace, current_lrs_name, new_lrs_name, centerline_feature_class, centerline_centerline_id_field, centerline_sequence_table, centerline_sequence_centerline_id_field, centerline_sequence_route_id_field, centerline_sequence_from_date_field, centerline_sequence_to_date_field, centerline_sequence_network_id_field, calibration_point_feature_class, calibration_point_measure_field, calibration_point_from_date_field, calibration_point_to_date_field, calibration_point_route_id_field, calibration_point_network_id_field, redline_feature_class, redline_from_measure_field, redline_to_measure_field, redline_route_id_field, redline_route_name_field, redline_effective_date_field, redline_activity_type_field, redline_network_id_field)
ModifyLRS example 2 (stand-alone script)

The following script demonstrates how to use the ModifyLRS function in a stand-alone Python script.

# Name: Modify_LRS_ex2.py
# Description: Modifies existing LRS configuration based on the new parameters provided
# Requires: ArcGIS Pipeline Referencing

# Import arcpy module
import arcpy

# check out any necessary licenses
arcpy.CheckOutExtension("LocationReferencing")

# Local variables:
input_workspace = r"c:\ModifyLRS\Py\ModifyLRS_python.gdb"
current_lrs_name = "LRS1"
new_lrs_name = "NewLRS"
centerline_feature_class = r"c:\ModifyLRS\Py\ModifyLRS_python.gdb\centerline1"
centerline_centerline_ID_field = "centerlineId"
centerline_sequence_table = r"c:\ModifyLRS\Py\ModifyLRS_python.gdb\centerline_Sequence1"
centerline_sequence_centerline_id_field = "centerlineId"
centerline_sequence_route_id_field = "RouteId"
centerline_sequence_from_date_field = "FromDate"
centerline_sequence_to_date_field = "ToDate"
centerline_sequence_network_ID_field = "NetworkId"
calibration_point_feature_class = r"c:\ModifyLRS\Py\ModifyLRS_python.gdb\calibration_Point1"
calibration_point_measure_field = "Measure"
calibration_point_from_date_field = "FromDate"
calibration_point_to_date_field = "ToDate"
calibration_point_route_id_field = "RouteId"
calibration_point_network_ID_field = "NetworkId"
redline_feature_class = r"c:\ModifyLRS\Py\ModifyLRS_python.gdb\Redline1"
redline_from_measure_field = "FromMeasure"
redline_to_measure_field = "ToMeasure"
redline_route_id_field = "RouteId"
redline_route_name_field = "RouteName"
redline_effective_date_field = "EffectiveDate"
redline_activity_type_field = "ActivityType"
redline_network_id_field = "NetworkId"

# execute the tool
arcpy.ModifyLRS_locref(in_workspace, current_lrs_name, new_lrs_name, centerline_feature_class, centerline_centerline_id_field, centerline_sequence_table, centerline_sequence_centerline_id_field, centerline_sequence_route_id_field, centerline_sequence_from_date_field, centerline_sequence_to_date_field, centerline_sequence_network_id_field, calibration_point_feature_class, calibration_point_measure_field, calibration_point_from_date_field, calibration_point_to_date_field, calibration_point_route_id_field, calibration_point_network_id_field, redline_feature_class, redline_from_measure_field, redline_to_measure_field, redline_route_id_field, redline_route_name_field, redline_effective_date_field, redline_activity_type_field, redline_network_id_field)

Environments

Licensing information

  • Basic: Requires ArcGIS Location Referencing
  • Standard: Requires ArcGIS Location Referencing
  • Advanced: Requires ArcGIS Location Referencing

Related topics