Modify LRS Network (Location Referencing)

Disponible avec la licence Location Referencing.

Synthèse

Modifies an LRS Network in a Location Referencing linear referencing system (LRS).

Utilisation

  • The input feature class must represent a Location 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.

  • The Route ID Field can be a single field or a concatenation of multiple fields. If the network uses a concatenated route ID, all of the fields that compose the route ID should be present in the network feature class.

  • The ability for an LRS Network to support a user-generated route ID network can be added or removed with this tool.

Paramètres

ÉtiquetteExplicationType de données
LRS Network Feature Class

The input LRS Network feature class to be modified.

Feature Layer
Route ID Field
(Facultatif)

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
(Facultatif)

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

Field
From Date Field
(Facultatif)

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

Field
To Date Field
(Facultatif)

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

Field
Derive From Line Network
(Facultatif)

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
(Facultatif)

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
(Facultatif)

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
(Facultatif)

The field in the input feature class that will be mapped as the LRS Network line ID. This parameter is only used if the Include Fields to Support Lines parameter is set to Include. The field type must match the RouteId field type of the Centerline_Sequence table and must either be a string of exactly 38 characters or a GUID field type.

Field
Line Name Field
(Facultatif)

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
(Facultatif)

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
Route ID Field Configuration
(Facultatif)

Determines the route ID configuration for an LRS Network.

  • As isThe current LRS Network route ID configuration will not be changed. This is the default.
  • Autogenerated Route IDThe route ID field will be an autogenerated GUID, and the route name can be configured as an LRS field.
  • Single-Field Route IDSupported only for nonline networks.
  • Multi-Field Route IDSupported only for nonline networks. More than one field is needed to form the concatenated route ID.
String
Field(s)
(Facultatif)

The individual fields in the LRS Network Feature Class that will be used to form the route ID. This parameter is only used if the Route ID Field Configuration parameter's Multi-Field Route ID option is set. The fields must be either string or number integer field types.

Field

Sortie obtenue

ÉtiquetteExplicationType de données
Output Network Feature Class

The updated network feature layer.

Feature Layer

arcpy.locref.ModifyLRSNetwork(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}, {route_id_configuration}, {individual_route_id_fields})
NomExplicationType de données
in_feature_class

The input LRS Network feature class to be modified.

Feature Layer
route_id_field
(Facultatif)

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
(Facultatif)

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

Field
from_date_field
(Facultatif)

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

Field
to_date_field
(Facultatif)

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

Field
derive_from_line_network
(Facultatif)

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
(Facultatif)

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
(Facultatif)

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
(Facultatif)

The field in the input feature class that will be mapped as the LRS Network line ID. This parameter is only used if the include_fields_to_support_lines parameter is set to INCLUDE. The field type must match the RouteId field type of the Centerline_Sequence table and must either be a string of exactly 38 characters or a GUID field type.

Field
line_name_field
(Facultatif)

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
(Facultatif)

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
route_id_configuration
(Facultatif)

Determines the route ID configuration for an LRS Network.

  • AS_ISThe current LRS Network route ID configuration will not be changed. This is the default.
  • AUTOGENERATED_ROUTE_IDThe route ID field will be an autogenerated GUID, and the route name can be configured as an LRS field.
  • SINGLE_FIELD_ROUTE_IDSupported only for nonline networks.
  • MULTI_FIELD_ROUTE_IDSupported only for nonline networks. More than one field is needed to form the concatenated route ID.
String
individual_route_id_fields
[individual_route_id_fields,...]
(Facultatif)

The individual fields in the in_feature_class that will be used to form the route ID. This parameter is only used if the route_id_configuration parameter's MULTI_FIELD_ROUTE_ID option is set. The fields must be either string or number integer field types.

Field

Sortie obtenue

NomExplicationType de données
out_feature_class

The updated network feature layer.

Feature Layer

Exemple de code

ModifyLRSNetwork example 1 (Python window)

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

# Name: Modify_LRS_Network_ex1.py
# Description: Modifies an existing linear referencing system (LRS) in the specified workspace.
# Requires: ArcGIS Location Referencing

# Check out license
arcpy.CheckOutExtension("LocationReferencing")

# Tool variables
in_feature_class = r"C:\UPDM_Data\LRS.gdb\LRS\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)
                              
# Check in license
arcpy.CheckInExtension('LocationReferencing')
ModifyLRSNetwork example 2 (stand-alone script)

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

# Name: Modify_LRS_Network_ex2.py
# Description: Modify an LRS Network to change field mapping for date fields. All other parameters will remain as is.
# Requires: ArcGIS Location Referencing

# Import arcpy module
import arcpy
 
# Check out license
arcpy.CheckOutExtension("LocationReferencing")

# Local variables:
Input_Network = r"C:\UPDM_Data\LRS.gdb\LRS\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"

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

# Check in license
arcpy.CheckInExtension('LocationReferencing')
ModifyLRSNetwork example 3 (Python window)

Demonstrates how to use the ModifyLRSNetwork tool in the Python window to modify the route ID field to support a user-generated single-field route ID.

# Name: ModifyLRSNetwork example 3 (Python window)
# Description: ModifyLRSNetwork example 3 (Python window)
# Requires: ArcGIS Location Referencing

# Check out license
arcpy.CheckOutExtension("LocationReferencing")

# Tool variables
in_feature_class = r"C:\UPDM_Data\LRS.gdb\LRS\Network1"
route_id_field = "RouteId"
route_name_field = ""
from_date_field = "FromDate"
to_date_field = "ToDate"
derive_from_line_network = ""
line_network_name = ""
include_fields_to_support_lines =""
line_id_field = ""
line_name_field = ""
line_order_field = ""
route_id_configuration = "SINGLE_FIELD_ROUTE_ID"
individual_route_id_fields = ""

# 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, include_fields_to_support_lines, line_id_field, line_name_field, line_order_field, route_id_configuration, individual_route_id_fields)

# Check in license
arcpy.CheckInExtension('LocationReferencing')
ModifyLRSNetwork example 4 (Python window)

Demonstrates how to use the ModifyLRSNetwork tool in the Python window to modify the route ID field to support a user-generated multifield route ID.

# Name: ModifyLRSNetwork example 4 (Python window)
# Description: ModifyLRSNetwork example 4 (Python window)
# Requires: ArcGIS Location Referencing

# Check out license
arcpy.CheckOutExtension("LocationReferencing")

# Tool variables
in_feature_class = r"C:\UPDM_Data\LRS.gdb\LRS\Network1"
route_id_field = "RouteId"
route_name_field = ""
from_date_field = "FromDate"
to_date_field = "ToDate"
derive_from_line_network = ""
line_network_name = ""
include_fields_to_support_lines =""
line_id_field = ""
line_name_field = ""
line_order_field = ""
route_id_configuration = "MULTI_FIELD_ROUTE_ID"
individual_route_id_fields = "Field1;Field2;Field3"

# 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, include_fields_to_support_lines, line_id_field, line_name_field, line_order_field, route_id_configuration, individual_route_id_fields)

# Check in license
arcpy.CheckInExtension('LocationReferencing')
ModifyLRSNetwork example 5 (stand-alone script)

Demonstrates how to use the ModifyLRSNetwork tool as a stand-alone Python script to modify the route ID field to support a user-generated single-field route ID.

# Name: ModifyLRSNetwork example 5 (stand-alone script)
# Description: ModifyLRSNetwork example 5 (stand-alone script)
# Requires: ArcGIS Location Referencing

# Import arcpy module
import arcpy
 
# Check out license
arcpy.CheckOutExtension("LocationReferencing")

# Local variables:
Input_Network = r"C:\UPDM_Data\LRS.gdb\LRS\EngineeringNetwork"
Route_ID = "RouteId"
Route_Name = ""
From_Date = "FromDate"
To_Date = "ToDate"
Derive = ""
Derive_From = ""
Line_Support = ""
Line_ID = ""
Line_Name = ""
Line_Order = ""
route_id_configuration = "SINGLE_FIELD_ROUTE_ID"
individual_route_id_fields = ""

# Execute the tool 
arcpy.ModifyLRSNetwork_locref(Input_Network, Route_ID, Route_Name, From_Date, To_Date, Derive, Derive_From, Line_Support, Line_ID, Line_Name, Line_Order, route_id_configuration, individual_route_id_fields)

# Check in license
arcpy.CheckInExtension('LocationReferencing')
ModifyLRSNetwork example 6 (stand-alone script)

Demonstrates how to use the ModifyLRSNetwork tool as a stand-alone Python script to modify the route ID field to support a user-generated multifield route ID.

# Name: ModifyLRSNetwork example 6 (stand-alone script)
# Description: ModifyLRSNetwork example 6 (stand-alone script)
# Requires: ArcGIS Location Referencing

# Import arcpy module
import arcpy
 
# Check out license
arcpy.CheckOutExtension("LocationReferencing")

# Local variables:
Input_Network = r"C:\UPDM_Data\LRS.gdb\LRS\EngineeringNetwork"
Route_ID = "RouteId"
Route_Name = ""
From_Date = "FromDate"
To_Date = "ToDate"
Derive = ""
Derive_From = ""
Line_Support = ""
Line_ID = ""
Line_Name = ""
Line_Order = ""
route_id_configuration = "MULTI_FIELD_ROUTE_ID"
individual_route_id_fields = "Field1;Field2;Field3"

# Execute the tool
arcpy.ModifyLRSNetwork_locref(Input_Network, Route_ID, Route_Name, From_Date, To_Date, Derive, Derive_From, Line_Support, Line_ID, Line_Name, Line_Order, route_id_configuration, individual_route_id_fields)

# Check in license
arcpy.CheckInExtension('LocationReferencing')

Environnements

Cas particuliers

Informations de licence

  • Basic: Nécessite ArcGIS Location Referencing
  • Standard: Nécessite ArcGIS Location Referencing
  • Advanced: Nécessite ArcGIS Location Referencing

Rubriques connexes