Skip To Content

Append Routes

Mit der Location Referencing-Lizenz verfügbar.

Zusammenfassung

Appends routes from an input polyline into an LRS Network.

Hinweis:

When the target layer is a feature service layer the validation results for this tool are written to the ArcGIS Server directory. This file is automatically cleaned up in 10 minutes by default, which may not be enough time to process all of the validations and then write them to your workstation that is running ArcGIS Pro. For larger data loads, it is recommended to adjust the maximum file age to at least one hour. For steps to adjust this setting, see Edit a server directory in Manager.

Verwendung

  • This tool will create centerlines in the target LRS Dataset as well as routes in the target LRS Network.

  • The output routes will have x-, y- and z-values from the input polyline vertices, but no m-values will be appended.

  • If your source polyline feature class has editor tracking enabled, map the source editor tracking fields to the fields you will use for editor tracking in the LRS Network while editor tracking is disabled in the target.

  • Any new fields that will be used for field mapping should be created in the underlying LRS Network Feature Class prior to appending routes.

  • The spatial reference, XY resolution and XY tolerance of the input polyline feature class and the target LRS Network must match.

  • A text log is written locally that states that the tool has been executed and contains information on any routes that failed validation. The tool messages will provide the location of the text log, which will be in the temporary directory.

  • The output of this tool is a modified LRS Network that has had routes appended and centerline features created.

Syntax

AppendRoutes_locref (source_routes, in_lrs_network, route_id_field, route_name_field, {from_date_field}, {to_date_field}, {line_id_field}, {line_name_field}, {line_order_field}, {field_map}, {load_type})
ParameterErklärungDatentyp
source_routes

The input from which the routes will be derived. The input can be a polyline feature class, shapefile, feature service, or an LRS Network feature class.

Feature Layer
in_lrs_network

The target LRS Network into which the routes will be loaded.

Feature Layer
route_id_field

The field in the input polyline feature class that will be mapped to the LRS Network route ID. The field type must match the RouteID field type of the target LRS Network and must either be a string or GUID field type. If it is a text field, the field length must be shorter than or equal to the length of the target RouteID field.

Field
route_name_field

The field in the input polyline feature class that will be mapped as the LRS Network route name. The field must be a string field, and the field length must be shorter than or equal to the length of the target route name field.

Field
from_date_field
(optional)

A date field in the input polyline feature class that will be mapped as the LRS Network from date. If a from date field is not mapped, a null value representing the beginning of time will be provided for all appended routes.

Field
to_date_field
(optional)

A date field in the input polyline feature class that will be mapped as the LRS Network to date. If a to date field is not mapped, a null value representing the end of time will be provided for all appended routes.

Field
line_id_field
(optional)

The field in the input polyline feature class that will be mapped as the LRS Network line ID. This parameter is only used if the target is an LRS Line Network. 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
(optional)

The string field in the input polyline feature class that will be mapped as the LRS Network line name. This parameter is only used if the target is an LRS Line Network.

Field
line_order_field
(optional)

The long integer field in the input polyline feature class that will be mapped as the LRS Network line order. This parameter is only used if the target is an LRS Line Network.

Field
field_map
(optional)

Controls how the attribute information in the fields of the source routes is transferred to the input LRS Network. Fields cannot be added to or removed from the target LRS Network because the data of the source routes is appended into an existing LRS Network that has a predefined schema (field definitions). While you can set merge rules for each output field, the tool ignores those rules. The ArcPy FieldMappings class can be used to define this parameter.

Field Mappings
load_type
(optional)

Determines how appended routes with measure or temporality overlaps with identical route IDs as Target Network records are loaded into the network feature class.

  • ADDAppends the input routes into the target LRS Network. If any route ID in the source routes already exists in the target LRS Network with the same temporality, it will be written to the output log as a duplicate route and must be corrected or filtered out before completing the loading process. This is the default.
  • RETIRE_BY_ROUTE_IDAppends the input routes into the target LRS Network and retires any routes in the target LRS Network that have the same route ID and temporality overlap as the appended routes. If the appended route eclipses a target route with the same route ID, the target route is deleted.
  • REPLACE_BY_ROUTE_IDAppends the input routes into the target LRS Network and deletes any routes in the target LRS Network with the same route ID as the appended routes.
String

Abgeleitete Ausgabe

NameErklärungDatentyp
out_lrs_network

Updated LRS Network feature layer.

Feature Layer
out_details_file

The text file that details changes made by the tool.

Text File

Codebeispiel

AppendRoutes example 1 (Python window)

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

#This will append routes into an existing LRS Network, replacing the existing routes where an overlap occurs

# tool variables
source_routes = "C:\\Data\\UPDM.gdb\\EngineeringNetwork"
in_lrs_network = "C:\\Data\\NY_Data.gdb\\P_Integrity\\P_EngineeringNetwork"
route_id_field = "RouteId"
route_name_field = "RouteName"
from_date_field = "FromDate"
to_date_field = "ToDate"
line_id_field = "LineId"
line_name_field = "LineName"
line_order_field = "LineOrder"
field_map = None
load_type = "REPLACE_BY_ROUTE_ID"

# execute the tool
arcpy.AppendRoutes_locref(source_routes, in_lrs_network, route_id_field, route_name_field, from_date_field, to_date_field, line_id_field, line_name_field, line_order_field, field_map, load_type)
AppendRoutes example 2 (stand-alone script)

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

# Name: AppendRoutes_ex2.py
# Description: Append records into an existing Pipeline Referencing network feature class without performing any attribute field mapping.
# Requires: ArcGIS Pipeline Referencing

# Import arcpy module
import arcpy

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

# Local variables:
SourceRoutes = "C:\\Data\\UPDM.gdb\\EngineeringNetwork"
TargetNetwork = "C:\\Data\\NY_Data.gdb\\P_Integrity\\P_EngineeringNetwork"
Route_ID = "RouteId"
Route_Name = "RouteName"
From_Date = "FromDate"
To_Date = "ToDate"
Line_ID = "LineId"
Line_Name = "LineName"
Line_Order = "LineOrder"

# Process: Append Routes
arcpy.AppendRoutes_locref(SourceRoutes, TargetNetwork, "RouteId", "RouteName", "FromDate", "ToDate", "LineId", "LineName", "LineOrder", None, "ADD")

Lizenzinformationen

  • Basic: Erfordert ArcGIS Pipeline Referencing
  • Standard: Erfordert ArcGIS Pipeline Referencing
  • Advanced: Erfordert ArcGIS Pipeline Referencing

Verwandte Themen