Create LRS From Existing Dataset (Location Referencing)

Synthèse

Creates a linear referencing system (LRS) in the specified workspace using existing datasets.

Utilisation

  • Minimum schema items are used for the centerline, centerline sequence, calibration point, and redline feature classes. Ensure that the items are empty, contained in the same geodatabase, and not used by another LRS in the geodatabase.

  • Centerline, calibration point, and redline feature classes must reside in a feature dataset.

  • The spatial reference, tolerance, and resolution of the centerline, calibration points, and redline feature classes must be the same.

  • The centerline and calibration point feature classes must be z-enabled and can be m-enabled.

  • The redline feature class must be z-enabled.

Paramètres

ÉtiquetteExplicationType de données
LRS Name

The name of the LRS to create. The name cannot already exist in the geodatabase.

String
Centerline - Feature Class

The feature class to use as the centerline in the LRS.

Feature Layer
Centerline - Centerline ID Field

The GUID field containing the centerline ID. The field type must match the centerlineID field type in the centerline sequence table.

Field
Centerline Sequence - Table

The table to use as the centerline sequence in the LRS.

Table View
Centerline Sequence - Centerline ID Field

The GUID field containing the centerline sequence ID. The field type must match the centerlineID field type and length in the centerline feature class.

Field
Centerline Sequence - Route ID Field

The GUID or text field containing the centerline sequence route ID. The field type must match the routeID field type and length in the calibration point and redline feature classes.

Field
Centerline Sequence - From Date Field

A date field containing the centerline sequence from date.

Field
Centerline Sequence - To Date Field

A date field containing the centerline sequence to date.

Field
Centerline Sequence - Network ID Field

The field containing the centerline sequence network ID. The short integer field type is supported.

Field
Calibration Point - Feature Class

The feature class to use as the calibration point in the LRS.

Feature Layer
Calibration Point - Measure Field

The field containing the calibration point measure. The double field type is supported.

Field
Calibration Point - From Date Field

A date field containing the calibration point from date.

Field
Calibration Point - To Date Field

A date field containing the calibration point to date.

Field
Calibration Point - Route ID Field

The field containing the calibration point route ID. GUID and text field types are supported. The field type must match the routeID field type and length in the centerline sequence table and redline feature class.

Field
Calibration Point - Network ID Field

The field containing the calibration point network ID. The short integer field type is supported.

Field
Redline - Feature Class

The feature class to use as the redline in the LRS.

Feature Layer
Redline - From Measure Field

The field containing the redline from measure. The double field type is supported.

Field
Redline - To Measure Field

The field containing the redline to measure. The double field type is supported.

Field
Redline - Route ID Field

The field containing the redline route ID. GUID and text field types are supported. The field type must match the routeID field type and length in the calibration point feature class and centerline sequence table.

Field
Redline - Route Name Field

A text field containing the redline route name.

Field
Redline - Effective Date Field

A date field containing the redline effective date.

Field
Redline - Activity Type Field

The field containing the redline activity type. The short integer field type is supported.

Field
Redline - Network ID Field

The field containing the redline network ID. The short integer field type is supported.

Field

Sortie obtenue

ÉtiquetteExplicationType de données
Output Location

The path of the newly created LRS Network.

Workspace

arcpy.locref.CreateLRSFromExistingDataset(lrs_name, centerline_feature_class, centerline_centerline_id_field, centerline_sequence_table, centerline_sequence_centerline_id_field, centerline_sequence_route_id_field, centerline_sequence_from_date_field, centerline_sequence_to_date_field, centerline_sequence_network_id_field, calibration_point_feature_class, calibration_point_measure_field, calibration_point_from_date_field, calibration_point_to_date_field, calibration_point_route_id_field, calibration_point_network_id_field, redline_feature_class, redline_from_measure_field, redline_to_measure_field, redline_route_id_field, redline_route_name_field, redline_effective_date_field, redline_activity_type_field, redline_network_id_field)
NomExplicationType de données
lrs_name

The name of the LRS to create. The name cannot already exist in the geodatabase.

String
centerline_feature_class

The feature class to use as the centerline in the LRS.

Feature Layer
centerline_centerline_id_field

The GUID field containing the centerline ID. The field type must match the centerlineID field type in the centerline sequence table.

Field
centerline_sequence_table

The table to use as the centerline sequence in the LRS.

Table View
centerline_sequence_centerline_id_field

The GUID field containing the centerline sequence ID. The field type must match the centerlineID field type and length in the centerline feature class.

Field
centerline_sequence_route_id_field

The GUID or text field containing the centerline sequence route ID. The field type must match the routeID field type and length in the calibration point and redline feature classes.

Field
centerline_sequence_from_date_field

A date field containing the centerline sequence from date.

Field
centerline_sequence_to_date_field

A date field containing the centerline sequence to date.

Field
centerline_sequence_network_id_field

The field containing the centerline sequence network ID. The short integer field type is supported.

Field
calibration_point_feature_class

The feature class to use as the calibration point in the LRS.

Feature Layer
calibration_point_measure_field

The field containing the calibration point measure. The double field type is supported.

Field
calibration_point_from_date_field

A date field containing the calibration point from date.

Field
calibration_point_to_date_field

A date field containing the calibration point to date.

Field
calibration_point_route_id_field

The field containing the calibration point route ID. GUID and text field types are supported. The field type must match the routeID field type and length in the centerline sequence table and redline feature class.

Field
calibration_point_network_id_field

The field containing the calibration point network ID. The short integer field type is supported.

Field
redline_feature_class

The feature class to use as the redline in the LRS.

Feature Layer
redline_from_measure_field

The field containing the redline from measure. The double field type is supported.

Field
redline_to_measure_field

The field containing the redline to measure. The double field type is supported.

Field
redline_route_id_field

The field containing the redline route ID. GUID and text field types are supported. The field type must match the routeID field type and length in the calibration point feature class and centerline sequence table.

Field
redline_route_name_field

A text field containing the redline route name.

Field
redline_effective_date_field

A date field containing the redline effective date.

Field
redline_activity_type_field

The field containing the redline activity type. The short integer field type is supported.

Field
redline_network_id_field

The field containing the redline network ID. The short integer field type is supported.

Field

Sortie obtenue

NomExplicationType de données
out_path

The path of the newly created LRS Network.

Workspace

Exemple de code

CreateLRSFromExistingDataset example 1 (Python window)

This script creates an LRS with existing minimum schema items using the CreateLRSFromExistingDataset function in the Python window.

# Name: Create_LRS_Existing_Dataset_ex1.py
# Description: Create an LRS using existing minimum schema items (Centerline, Centerline Sequence, Calibration Point, Redline) in a file or multiuser geodatabase.
# Requires: ArcGIS Location Referencing

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

# Tool variables
lrs_name = "LRS"
centerline_feature_class = r"C:\Data\PipelineData.sde\LRS\Centerline"
centerline_centerline_id_field = "Centerline_ID"
centerline_sequence_table = r"C:\Data\PipelineData.gdb\CenterlineSequence"
centerline_sequence_centerline_id_field = "Centerline_ID"
centerline_sequence_route_id_field = "Route_ID"
centerline_sequence_from_date_field = "From_Date"
centerline_sequence_to_date_field = "To_Date"
centerline_sequence_network_id_field = "Network_ID"
calibration_point_feature_class = r"C:\Data\PipelineData.gdb\LRS\CalibrationPoint"
calibration_point_measure_field = "Measure"
calibration_point_from_date_field = "From_Date"
calibration_point_to_date_field = "To_Date"
calibration_point_route_id_field = "Route_ID"
calibration_point_network_id_field = "Network_ID"
redline_feature_class = r"C:\Data\PipelineData.gdb\LRS\Redline"
redline_from_measure_field = "From_Measure"
redline_to_measure_field = "To_Measure"
redline_route_id_field = "Route_ID"
redline_route_name_field = "Route_Name"
redline_effective_date_field = "Effective_Date"
redline_activity_type_field = "Activity_Type"
redline_network_id_field = "Network_ID"

# Set current workspace
arcpy.env.workspace = "C:\Data\PipelineData.sde"

# Execute the tool
arcpy.CreateLRSFromExistingDataset_locref(lrs_name, centerline_feature_class, centerline_centerline_id_field,
                                          centerline_sequence_table, centerline_sequence_centerline_id_field,
                                          centerline_sequence_route_id_field, centerline_sequence_from_date_field,
                                          centerline_sequence_to_date_field, centerline_sequence_network_id_field,
                                          calibration_point_feature_class, calibration_point_measure_field,
                                          calibration_point_from_date_field, calibration_point_to_date_field,
                                          calibration_point_route_id_field, calibration_point_network_id_field,
                                          redline_feature_class, redline_from_measure_field, redline_to_measure_field,
                                          redline_route_id_field, redline_route_name_field, redline_effective_date_field,
                                          redline_activity_type_field, redline_network_id_field)

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

This script creates an LRS with existing minimum schema items using the CreateLRSFromExistingDataset function in a stand-alone Python script.

# Name: Create_LRS_Existing_Dataset_ex2.py
# Description: Create an LRS using existing minimum schema items (Centerline, Centerline Sequence, Calibration Point, Redline) in a file or multiuser geodatabase.
# Requires: ArcGIS Location Referencing

# Import arcpy module
import arcpy

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

# Local variables
lrs_name = "LRS"
centerline_feature_class = r"C:\Data\PipelineData.gdb\LRS\Centerline"
centerline_centerline_id_field = "CenterlineID"
centerline_sequence_table = r"C:\Data\PipelineData.gdb\CenterlineSequence"
centerline_sequence_centerline_id_field = "CenterlineID"
centerline_sequence_route_id_field = "RouteID"
centerline_sequence_from_date_field = "FromDate"
centerline_sequence_to_date_field = "ToDate"
centerline_sequence_network_id_field = "NetworkID"
calibration_point_feature_class = r"C:\DataPipelineData.gdb\LRS\CalibrationPoint"
calibration_point_measure_field = "Measure"
calibration_point_from_date_field = "FromDate"
calibration_point_to_date_field = "ToDate"
calibration_point_route_id_field = "RouteID"
calibration_point_network_id_field = "NetworkID"
redline_feature_class = r"C:\DataPipelineData.gdb\LRS\CalibrationPoint"
redline_from_measure_field = "FromMeasure"
redline_to_measure_field = "ToMeasure"
redline_route_id_field = "RouteID"
redline_route_name_field = "RouteName"
redline_effective_date_field = "EffectiveDate"
redline_activity_type_field = "ActivityType"
redline_network_id_field = "NetworkID"

# Execute the tool
arcpy.CreateLRSFromExistingDataset_locref(lrs_name, centerline_feature_class, centerline_centerline_id_field,
                                          centerline_sequence_table, centerline_sequence_centerline_id_field,
                                          centerline_sequence_route_id_field, centerline_sequence_from_date_field,
                                          centerline_sequence_to_date_field, centerline_sequence_network_id_field,
                                          calibration_point_feature_class, calibration_point_measure_field,
                                          calibration_point_from_date_field, calibration_point_to_date_field,
                                          calibration_point_route_id_field, calibration_point_network_id_field,
                                          redline_feature_class, redline_from_measure_field, redline_to_measure_field,
                                          redline_route_id_field, redline_route_name_field, redline_effective_date_field,
                                          redline_activity_type_field, redline_network_id_field)

# 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