Skip To Content

Modify LRS Network

Summary

Modifies an LRS Network within an ArcGIS Pipeline Referencing linear referencing system (LRS).

Usage

  • The input feature class must represent a Pipeline Referencing LRS Network.

  • This tool does not delete any LRS Networks, feature classes, fields, or data.

  • This tool updates internal metadata tables that store information about the input LRS Network.

  • This tool allows the remapping of LRS Network fields such as route ID, route name, date, and measure fields. If line support is enabled, the line ID, line name, and line order fields can also be remapped.

  • Any new fields that will be used for field mapping should be created in the underlying LRS Network feature class before using this tool.

  • The ability for an LRS Network to support lines, such as for an engineering network, can be added or removed with this tool.

  • If a network that supports lines is present in the geodatabase workspace of the input LRS Network, an LRS Derived Network can be configured with this tool. An existing LRS Derived Network can also be unregistered from an LRS Line Network and registered with a different LRS Line Network.

  • A field from the input LRS Network can only be mapped to a single LRS Network field.

Syntax

ModifyLRSNetwork_locref (in_feature_class, {route_id_field}, {route_name_field}, {from_date_field}, {to_date_field}, {derive_from_line_network}, {line_network_name}, {include_fields_to_support_lines}, {line_id_field}, {line_name_field}, {line_order_field})
ParameterExplanationData Type
in_feature_class

The input LRS Network feature class to be modified.

Feature Layer
route_id_field
(Optional)

The field in the input feature class that will be mapped as the LRS Network route ID. The field type must match the RouteId field type of the Centerline_Sequence table and must either be a string or GUID field type.

Field
route_name_field
(Optional)

A string field in the input feature class that will be mapped as the LRS Network route name.

Field
from_date_field
(Optional)

A date field in the input feature class that will be mapped as the LRS Network from date.

Field
to_date_field
(Optional)

A date field in the input feature class that will be mapped as the LRS Network to date.

Field
derive_from_line_network
(Optional)

Determines if the current LRS network will be configured as an LRS Derived Network.

  • AS_ISThe current LRS Network derived property will not be changed. This is the default.
  • DERIVEThe input LRS Derived Network will be modified to become an LRS Derived Network. The line network name parameter must also be provided to specify which LRS Network to derive from.
  • DO_NOT_DERIVEThe input LRS Derived Network will be modified to no longer be an LRS Derived Network.
String
line_network_name
(Optional)

The name of the LRS Line Network to which the input LRS Derived Network will be registered. The input LRS Line Network must reside in the same geodatabase workspace and LRS as the LRS network feature class. This parameter is only used if the derive_from_line_network parameter is set to DERIVE.

String
include_fields_to_support_lines
(Optional)

Determines if the current LRS network will be configured to support lines.

  • AS_ISThe current LRS Network line support property will not be changed. This is the default.
  • INCLUDEThe input LRS Network will be modified to add support for lines. The line id field, line name field, and line order field parameters must also be provided, and valid fields to map to these parameters must exist in the LRS network feature class.
  • DO_NOT_INCLUDEThe input LRS Network will be modified to remove support for lines.
String
line_id_field
(Optional)
Field
line_name_field
(Optional)

A string field in the input feature class that will be mapped as the LRS Network line name. This parameter is only used if the include_fields_to_support_lines parameter is set to INCLUDE.

Field
line_order_field
(Optional)

The field in the input feature class that will be mapped as the LRS Network line order. This parameter is only used if the Include Fields to Support Lines parameter is set to Include. This must be a long integer field type.

The field in the input feature class that will be mapped as the LRS Network line order. This parameter is only used if the include_fields_to_support_lines parameter is set to INCLUDE. This must be a long integer field type.

Field

Code sample

ModifyLRSNetwork example 1 (Python window)

Demonstrates how to use the ModifyLRSNetwork tool in the Python window.

# tool variables
in_feature_class = r"C:\UPDM_Data\LRS.gdb\DerivedNetwork"
route_id_field = "RouteId"
route_name_field = "RouteName"
from_date_field = "FromDate"
to_date_field = "ToDate"
derive_from_line_network = "DO_NOT_DERIVE"
line_network_name = "EngineeringNetwork"

# set current workspace
arcpy.env.workspace = "C:\UPDM_Data\LRS.gdb"

# execute the tool
arcpy.ModifyLRSNetwork_locref(in_feature_class, route_id_field, route_name_field, from_date_field, to_date_field,
                              derive_from_line_network, line_network_name)
ModifyLRSNetwork example 2 (stand-alone script)

Demonstrates how to use the ModifyLRSNetwork tool as a stand-alone Python script.

# Name: ModifyLRSNetwork.py
# Description: Example for modifying an LRS Network to change field mapping for date fields. All other parameters will remain as-is.
# Requires: ArcGIS Pipeline Referencing

# Import arcpy module
import arcpy
 
# Check out any necessary licenses
arcpy.CheckOutExtension("LocationReferencing")

# Local variables:
Input_Network = r"C:\UPDM_Data\LRS.gdb\EngineeringNetwork"
Route_ID = "RouteId"
Route_Name = "RouteName"
From_Date = "FromDate_New"
To_Date = "ToDate_New"
Derive = "DO_NOT_DERIVE"
Derive_From = None
Line_Support = "INCLUDE"
Line_ID = "LineId"
Line_Name = "LineName"
Line_Order = "LineOrder"

arcpy.ModifyLRSNetwork_locref(Input_Network, Route_ID, Route_Name, From_Date, To_Date, Derive, Derive_From,
                              Line_Support, Line_ID, Line_Name, Line_Order)

Environments

Licensing information

  • ArcGIS Desktop Basic: Requires ArcGIS Pipeline Referencing
  • ArcGIS Desktop Standard: Requires ArcGIS Pipeline Referencing
  • ArcGIS Desktop Advanced: Requires ArcGIS Pipeline Referencing

Related topics