Generate Routes (Location Referencing)

Available with Location Referencing license.

Summary

Re-creates shapes and applies calibration changes for route features in an LRS Network.

Additionally, the tool can determine calibration changes on routes so event behaviors can be processed. These calibration changes can be due to adding, editing, or deleting calibration points outside the Location Referencing tools in ArcGIS Pro.

Usage

  • Input the LRS Network whose features need to be regenerated or need calibration changes applied based on the route shape from the centerline feature class, and measure values from the calibration point feature class.

  • If a derived network is configured using a line network, running Generate Routes on the line network will also update the derived network.

  • Routes in the derived network are generated by combining the route shapes in the parent line.

  • When conflict prevention is enabled for the tool, any events being generated by the tool will be locked.

    • While working in the default version, the locks acquired will be released automatically when the tool completes.
    • While working in a child version, the locks acquired will remain in On Post status when the tool completes. The lock owner must post or delete the version to release the locks.
    • While working in a child version, if the tool is canceled by interruption, the locks are acquired and will remain in releasable status when the tool completes.

  • This tool supports conflict prevention and will attempt to acquire and transfer locks.

    Learn more about conflict prevention in ArcGIS Pipeline Referencing or conflict prevention in ArcGIS Roads and Highways.

Parameters

LabelExplanationData Type
Input Route Features

The LRS Network for which route shapes will be regenerated and calibration changes will be applied.

Feature Layer
Record calibration changes for event location updates
(Optional)

This parameter is not supported. Any value provided will be ignored.

Boolean

Derived Output

LabelExplanationData Type
Output Route Features

The updated route feature layer.

Feature Layer
Output Derived Route Features

The updated LRS Network to which route shapes have been generated and calibration changes have been applied.

Feature Layer
Output Results File

A text file that details the routes that were updated in the LRS Network feature class.

Text File

arcpy.locref.GenerateRoutes(in_route_features, {record_calibration_changes})
NameExplanationData Type
in_route_features

The LRS Network for which route shapes will be regenerated and calibration changes will be applied.

Feature Layer
record_calibration_changes
(Optional)

This parameter is not supported. Any value provided will be ignored.

Boolean

Derived Output

NameExplanationData Type
out_route_features

The updated route feature layer.

Feature Layer
out_derived_route_features

The updated LRS Network to which route shapes have been generated and calibration changes have been applied.

Feature Layer
out_details_file

A text file that details the routes that were updated in the LRS Network feature class.

Text File

Code sample

GenerateRoutes example 1 (Python window)

Demonstrates how to use the GenerateRoutes function in immediate mode.

# Name: GenerateRoutes_ex1.py
# Description: Re-creates shapes and applies calibration changes for route features in an LRS Network.
# Requires: ArcGIS Location Referencing

# Set current workspace
arcpy.env.workspace = r"C:\Data\PipelineReferencing.gdb"

# Local variables
in_route_features = "LineNetwork"

# Execute the tool
arcpy.locref.GenerateRoutes(in_route_features)
GenerateRoutes example 2 (stand-alone script)

Demonstrates how to use the GenerateRoutes function in a stand-alone Python script.

# Name: GenerateRoutes_ex2.py
# Description: Re-creates shapes and applies calibration changes for route features in an LRS Network.
# Requires: ArcGIS Location Referencing

# Import arcpy module
import arcpy

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

# Local variables
in_route_features = r'C:\Data\PipelineReferencing.gdb\LRS\LineNetwork'

# Execute the tool
arcpy.locref.GenerateRoutes(in_route_features)

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

Demonstrates how to use the GenerateRoutes function in a stand-alone Python script in a feature service.

# Name: GenerateRoutes_Pro_Ex3.py
# Description: Generate routes in stand-alone mode using a feature service. It is recommended to work in a version and post it into the default version.
# Requires: ArcGIS Location Referencing

# Import arcpy module
import arcpy

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

# Input LRS route network is in feature service.  Signing into portal is required to access the feature service.
arcpy.SignInToPortal('https://yourdomain.com/portal', 'username', 'password')

# Map the input LRS route network from the feature service. Here, 1 corresponds to the input LRS route network.
in_route_features = r"https://yourdomain.com/server/rest/services/FeatureServiceName/FeatureServer/1"

# Process : Generate Routes.
arcpy.locref.GenerateRoutes(in_route_features)

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

Environments

Special cases

Parallel Processing Factor

The default value for this environment, if left blank, is 0%. Any absolute value for the environment is always clamped between 0 and the number of logical cores in that machine.

Licensing information

  • Basic: Requires ArcGIS Location Referencing (ArcGIS Pipeline Referencing or ArcGIS Roads and Highways)
  • Standard: Requires ArcGIS Location Referencing (ArcGIS Pipeline Referencing or ArcGIS Roads and Highways)
  • Advanced: Requires ArcGIS Location Referencing (ArcGIS Pipeline Referencing or ArcGIS Roads and Highways)

Related topics