Create LRS (Location Referencing)

Zusammenfassung

Creates a linear referencing system (LRS) and minimum schema items in a specified workspace.

Verwendung

  • The minimum schema items created are the Centerline, Centerline Sequence, Calibration Point, and Redline feature classes.

  • The names for the LRS, centerline, calibration point, redline, and centerline sequence should be unique and not already exist in the geodatabase.

  • The spatial reference, tolerance, and resolution inputs will be applied to all output feature classes.

  • If the input location is a feature dataset, the spatial reference, tolerance, and resolution of the feature dataset must match that of the inputs for the tool.

  • The xy- and z-tolerance must be at least twice as large as the xy- and z-resolution.

Syntax

CreateLRS(in_workspace, lrs_name, centerline_feature_class_name, calibration_point_feature_class_name, redline_feature_class_name, centerline_sequence_table_name, spatial_reference, {xy_tolerance}, {z_tolerance}, {xy_resolution}, {z_resolution})
ParameterErklärungDatentyp
in_workspace

The file or multipurpose geodatabase where the LRS and minimum schema will be created.

Workspace; Feature Dataset
lrs_name

The name of the output LRS.

String
centerline_feature_class_name

Name of the output centerline feature class.

String
calibration_point_feature_class_name

Name of the output calibration point feature class.

String
redline_feature_class_name

Name of the output redline feature class.

String
centerline_sequence_table_name

Name of the output centerline sequence table.

String
spatial_reference

The spatial reference for the output feature classes. When executing from a Python script, you can use the Well Known ID (WKID) for the spatial reference.

Spatial Reference
xy_tolerance
(optional)

The xy-tolerance of the output feature classes.

Linear Unit
z_tolerance
(optional)

The z-tolerance of the output feature classes.

Linear Unit
xy_resolution
(optional)

The xy-resolution of the output feature classes.

Linear Unit
z_resolution
(optional)

The z-resolution of the output feature classes.

Linear Unit

Abgeleitete Ausgabe

NameErklärungDatentyp
out_workspace

The updated LRS workspace.

Workspace; Feature Dataset
out_centerline_feature_class

The updated centerline feature layer.

Feature Class
out_calibration_point_feature_class

The updated calibration point feature layer.

Feature Class
out_redline_feature_class

The updated redline feature layer.

Feature Class
out_centerline_sequence_table

Updated centerline sequence table.

Table

Codebeispiel

CreateLRS example 1 (Python window)

Demonstrates how to use the CreateLRS tool in immediate mode.

# Name: Create_LRS_ex1.py
# Description: Create an LRS and minimum schema items (Centerline, Centerline Sequence, Calibration Point, Redline).
# Requires: ArcGIS Location Referencing

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

# Tool variables
in_workspace = r"C:/Data/PipelineData.gdb/"
lrs_name = "LRS"
centerline_feature_class_name = "Centerline"
calibration_point_feature_class_name = "Calibration_Point"
redline_feature_class_name = "Redline"
centerline_sequence_table_name = "Centerline_Sequence"
spatial_reference = "26111"
xy_tolerance = "0.01 Meters"
z_tolerance = "0.01 Meters"
xy_resolution = "0.001 Meters"
z_resolution = "0.001 Meters"

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

# execute the tool
arcpy.CreateLRS_locref(in_workspace, lrs_name, centerline_feature_class_name, calibration_point_feature_class_name,
                       redline_feature_class_name, centerline_sequence_table_name, spatial_reference, xy_tolerance,
                       z_tolerance, xy_resolution, z_resolution)

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

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

# Name: Create_LRS_ex2.py
# Description: Create an LRS and minimum schema items (Centerline, Centerline Sequence, Calibration Point, Redline).
# Requires: ArcGIS Location Referencing

# Import arcpy module
import arcpy

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

# Local Variables
in_workspace = r"C:\Data\PipelineData.gdb"
lrs_name = "LRS"
centerline_feature_class_name = "Centerline"
calibration_point_feature_class_name = "CalibrationPoint"
redline_feature_class_name = "Redline"
centerline_sequence_table_name = "CenterlineSequence"
spatial_reference = "NAD83 Albers Equal Area, 48 States, Panhandle, US Foot"
xy_tolerance = "0.001 Feet"
z_tolerance = "0.001 Feet"
xy_resolution = "0.0001 Feet"
z_resolution = "0.0001 Feet"

arcpy.CreateLRS_locref(in_workspace, lrs_name, centerline_feature_class_name, calibration_point_feature_class_name,
                       redline_feature_class_name, centerline_sequence_table_name, spatial_reference, xy_tolerance,
                       z_tolerance, xy_resolution, z_resolution)

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

Lizenzinformationen

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

Verwandte Themen