Mit der Location Referencing-Lizenz verfügbar.
Zusammenfassung
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.
Verwendung
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.
An LRS dataset is required to run this tool. To create an LRS dataset, add the calibration point, centerline, and redline layers to a feature dataset; then run the Modify LRS tool with the geodatabase as the input.
If calibration points are deleted or have their date changed outside the ArcGIS Location 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.
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 are 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 execution of the tool is canceled by interruption, the locks are acquired and will remain in releasable status when the tool completes.
Syntax
arcpy.locref.GenerateRoutes(in_route_features, {record_calibration_changes})
Parameter | Erklärung | Datentyp |
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) | Specifies whether event behaviors will be applied.
| Boolean |
Abgeleitete Ausgabe
Name | Erklärung | Datentyp |
out_route_features | 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 |
Codebeispiel
Demonstrates how to use GenerateRoutes 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
# Check out license
arcpy.CheckOutExtension("LocationReferencing")
# Local variables
in_route_features = r'C:\Data\PipelineReferencing.gdb\LRS\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)
# Check in license
arcpy.CheckInExtension('LocationReferencing')
Demonstrates how to use GenerateRoutes 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.
# Requirements: 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'
record_calibration_changes = "RECORD_CALIBRATION_CHANGES"
# Execute the tool
arcpy.GenerateRoutes_locref(in_route_features, record_calibration_changes)
# Check in license
arcpy.CheckInExtension('LocationReferencing')
Demonstrates how to use GenerateRoutes in a stand-alone Python script in a feature service.
# Name: GenerateRoutes_Pro_Ex3.py.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 in 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 = r"https://yourdomain.com/server/rest/services/FeatureServiceName/FeatureServer/1"
# Process : Generate Routes.
arcpy.GenerateRoutes_locref(in_route)
# Check in license
arcpy.CheckInExtension('LocationReferencing')
Umgebungen
Lizenzinformationen
- Basic: Erfordert ArcGIS Location Referencing
- Standard: Erfordert ArcGIS Location Referencing
- Advanced: Erfordert ArcGIS Location Referencing