Skip To Content

Generate Routes

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 calibration points are deleted or have their date changed outside the ArcGIS Pipeline Referencing tools in ArcGIS Pro, and Generate Routes is executed with the Record calibration changes for event location updates option, any events within the area where the calibration point was deleted or had their date changed will have move event behavior instead of stay put.

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

Syntax

GenerateRoutes_locref (in_route_features, {record_calibration_changes})
ParameterExplanationData 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)
  • RECORD_CALIBRATION_CHANGESAny calibration points created, modified, or deleted outside the ArcGIS Pipeline Referencing tools will be applied to the routes in the network and event behaviors will be applied the next time Apply Event Behaviors is run.
  • NO_RECORD_CALIBRATION_CHANGESCalibration changes will be applied to the routes in the LRS Network, but no event behaviors will be applied. This is the default.
Boolean

Code sample

GenerateRoutes example 1 (Python window)

Demonstrates how to use GenerateRoutes in immediate mode.

# Import arcpy module
import arcpy

# Local variables
in_route_features = r'C:\Data\PipelineReferencing.gdb\LineNetwork'
record_calibration_changes = "NO_RECORD_CALIBRATION_CHANGES"

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

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

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

# Name: GenerateRoutes_ex2.py
# Description: Recreates shapes and applies calibration changes for route features in a LRS Network.
# Requirements: ArcGIS Pipeline Referencing

# Import arcpy module
import arcpy

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

# Local variables
in_route_features = r'C:\Data\PipelineReferencing.gdb\LineNetwork'
record_calibration_changes = "RECORD_CALIBRATION_CHANGES"

# Execute the tool
arcpy.GenerateRoutes_locref(in_route_features, record_calibration_changes)

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