Create LRS Intersection From Existing Dataset (Location Referencing)

Summary

Registers an existing intersection feature class as an intersection.

Usage

  • The projected coordinate system of the intersecting feature classes must match that of the Parent LRS Network parameter value.

  • The Parent LRS Network parameter value can be used as an intersecting layer, so the intersections produced will be between the routes in a network.

  • The Parent LRS Network parameter value cannot be a feature service.

  • The Intersection Feature Class parameter value and the intersecting layers must be in the same geodatabase as the Parent LRS Network parameter value.

  • The name of the intersection is created by concatenating the Network Description Field parameter value with the Description Field value in the Intersecting Layers parameter, separated by the Name Separator value in the Intersecting Layers parameter.

  • The Intersection Feature Class fields must include the properties outlined in the LRS data model.

  • The Intersecting Layers parameter value must be z-enabled.

Parameters

LabelExplanationData Type
Parent LRS Network

The network to which the intersection will be registered.

Feature Layer
Network Description Field

The field in the network layer that will be used to name the intersections with other intersecting layers.

Field
Intersection Feature Class

The input point feature class to be registered.

Feature Layer
Intersection ID Field

The ID field in the Intersection Feature Class parameter value. The field must have a unique ID for each intersection for a time slice.

Field
Intersection Name Field

The field in the Intersection Feature Class parameter value that is a concatenated field showing the descriptors for the route and the intersecting feature.

Field
Route ID Field

The field in the Intersection Feature Class parameter value that contains the route ID for the LRS Network.

Field
Feature ID Field

The field in the Intersection Feature Class parameter value that contains the ID for the intersecting feature.

Field
Feature Class Name Field

The field in the Intersection Feature Class parameter value that contains the name of the feature class that participated in the intersection.

Field
From Date Field

The from date field in the Intersection Feature Class parameter value.

Field
To Date Field

The to date field in the Intersection Feature Class parameter value.

Field
Intersecting Layers

The feature class that intersects the LRS Network and contains the following information:

  • Intersection Layer—The feature class that intersects the LRS Network.
  • ID Field—The field in the intersecting layer used to uniquely identify the feature that intersects the network.
  • Description Field—The field that provides the description, such as town or county name, of the intersecting feature.
  • Name Separator—The name separator for the intersection, such as AND, INTERSECT, +, or |.
Value Table
Consider z-values when generating intersections
(Optional)

Specifies whether z-values will be used when generating intersections.

  • Checked—Z-values will be used during generation of intersections.
  • Unchecked—Z-values will not be used during generation of intersections. This is the default.
Boolean
Z Tolerance

The z-tolerance used to generate intersections.

Double
Measure Field

The measure on the base route at the point of intersection.

Field

Derived Output

LabelExplanationData Type
Output Details File

The output feature class detailing the changes made to the Intersection Feature Class parameter value.

Feature Class

arcpy.locref.CreateLRSIntersectionFromExistingDataset(parent_network, network_description_field, in_feature_class, intersection_id_field, intersection_name_field, route_id_field, feature_id_field, feature_class_name_field, from_date_field, to_date_field, intersecting_layers, {consider_z}, z_tolerance, measure_field)
NameExplanationData Type
parent_network

The network to which the intersection will be registered.

Feature Layer
network_description_field

The field in the network layer that will be used to name the intersections with other intersecting layers.

Field
in_feature_class

The input point feature class to be registered.

Feature Layer
intersection_id_field

The ID field in the in_feature_class parameter value. The field must have a unique ID for each intersection for a time slice.

Field
intersection_name_field

The field in the in_feature_class parameter value that is a concatenated field showing the descriptors for the route and the intersecting feature.

Field
route_id_field

The field in the in_feature_class parameter value that contains the route ID for the LRS Network.

Field
feature_id_field

The field in the in_feature_class parameter value that contains the ID for the intersecting feature.

Field
feature_class_name_field

The field in the in_feature_class parameter value that contains the name of the feature class that participated in the intersection.

Field
from_date_field

The from date field in the in_feature_class parameter value.

Field
to_date_field

The to date field in the in_feature_class parameter value.

Field
intersecting_layers
[intersecting_layers,...]

The feature class that intersects the LRS Network and contains the following information:

  • Intersection Layer—The feature class that intersects the LRS Network.
  • ID Field—The field in the intersecting layer used to uniquely identify the feature that intersects the network.
  • Description Field—The field that provides the description, such as town or county name, of the intersecting feature.
  • Name Separator—The name separator for the intersection, such as AND, INTERSECT, +, or |.
Value Table
consider_z
(Optional)

Specifies whether z-values will be used when generating intersections.

  • CONSIDER_ZZ-values will be used during generation of intersections.
  • DO_NOT_CONSIDER_ZZ-values will not be used during generation of intersections. This is the default.
Boolean
z_tolerance

The z-tolerance used to generate intersections.

Double
measure_field

The measure on the base route at the point of intersection.

Field

Derived Output

NameExplanationData Type
out_feature_class

The output feature class detailing the changes made to the in_feature_class parameter value.

Feature Class

Code sample

CreateLRSIntersectionFromExistingDataset example 1 (Python window)

The following script demonstrates how to use the CreateLRSIntersectionFromExistingDataset function in the Python window.

# Name: Create_LRS_Intersection_From_Existing_Dataset_ex1.py
# Description: Create an LRS Intersection from an existing dataset.
# Requires: ArcGIS Location Referencing

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

# Tool variables
parent_network = r"C:\Demo.gdb\LRS\Network"
network_description_field = "RouteName"
in_feature_class = r"C:\Demo.gdb\LRS\Intersection1"
intersection_id_field = "IntersectionId"
intersection_name_field = "IntersectionName"
route_id_field = "RouteID"
feature_id_field = "featureId"
feature_class_name_field = "featureClassName"
from_date_field = "FromDate"
to_date_field = "ToDate"
intersecting_layers = "[{Network, RouteID, RouteName, & RouteName:}]"
measure_field = "Measure"

# Set current workspace
arcpy.env.workspace = "C:\Demo.gdb"

# Execute the tool
arcpy.locref.CreateLRSIntersectionFromExistingDataset(parent_network, network_description_field, in_feature_class, 
                                                      intersection_id_field, intersection_name_field, route_id_field, 
                                                      feature_id_field, feature_class_name_field, from_date_field, 
                                                      to_date_field, intersecting_layers, measure_field)


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

The following script demonstrates how to use the CreateLRSIntersectionFromExistingDataset function in a stand-alone script.

# Name: Create_LRS_Event_From_Existing_Dataset_ex2.py
# Description: Register an existing feature class as an event in this stand-alone script.
# Requires: ArcGIS Location Referencing 

# Import arcpy module
import arcpy 

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

# Tool variables
parent_network = r"C:\Demo.gdb\LRS\Network"
network_description_field = "RouteName"
in_feature_class = r"C:\Demo.gdb\LRS\Intersection1"
intersection_id_field = "IntersectionId"
intersection_name_field = "IntersectionName"
route_id_field = "RouteID"
feature_id_field = "featureId"
feature_class_name_field = "featureClassName"
from_date_field = "FromDate"
to_date_field = "ToDate"
intersecting_layers = "[{Network, RouteId, RouteName, & RouteName:}]"
measure_field = "Measure"

# Set current workspace
arcpy.env.workspace = "C:\Demo.gdb"

# Execute the tool
arcpy.locref.CreateLRSIntersectionFromExistingDataset(parent_network, network_description_field, in_feature_class, 
                                                      intersection_id_field, intersection_name_field, route_id_field, 
                                                      feature_id_field, feature_class_name_field, from_date_field, 
                                                      to_date_field, intersecting_layers, measure_field)

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

Environments

This tool does not use any geoprocessing environments.

Licensing information

  • Basic: Requires ArcGIS Location Referencing (ArcGIS Pipeline Referencing or ArcGIS Roads and Highways)
  • Standard: Requires ArcGIS Location Referencing (ArcGIS Pipeline Referencing or ArcGIS Roads and Highways)
  • Advanced: Requires ArcGIS Location Referencing (ArcGIS Pipeline Referencing or ArcGIS Roads and Highways)

Related topics