Create LRS (Location Referencing)

Resumen

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

Uso

  • 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.

Parámetros

EtiquetaExplicaciónTipo de datos
Input Location

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
(Opcional)

The xy-tolerance of the output feature classes.

Linear Unit
Z Tolerance
(Opcional)

The z-tolerance of the output feature classes.

Linear Unit
XY Resolution
(Opcional)

The xy-resolution of the output feature classes.

Linear Unit
Z Resolution
(Opcional)

The z-resolution of the output feature classes.

Linear Unit

Salida derivada

EtiquetaExplicaciónTipo de datos
Updated Input Location

The updated LRS workspace.

Workspace; Feature Dataset
Output Centerline Feature Class

The updated centerline feature layer.

Feature Class
Output Calibration Point Feature Class

The updated calibration point feature layer.

Feature Class
Output Redline Feature Class

The updated redline feature layer.

Feature Class
Output Centerline Sequence Table

Updated centerline sequence table.

Table

arcpy.locref.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})
NombreExplicaciónTipo de datos
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
(Opcional)

The xy-tolerance of the output feature classes.

Linear Unit
z_tolerance
(Opcional)

The z-tolerance of the output feature classes.

Linear Unit
xy_resolution
(Opcional)

The xy-resolution of the output feature classes.

Linear Unit
z_resolution
(Opcional)

The z-resolution of the output feature classes.

Linear Unit

Salida derivada

NombreExplicaciónTipo de datos
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

Muestra de código

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')

Entornos

Casos especiales

Información de licenciamiento

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

Temas relacionados