Create LRS Intersection From Existing Dataset (Location Referencing)

Résumé

Registers an existing intersection feature class as an intersection.

Utilisation

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

Syntaxe

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)
ParamètreExplicationType de données
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 Intersection Feature Class. 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 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 that contains the route ID for the LRS Network.

Field
feature_id_field

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

Field
feature_class_name_field

The field in the Intersection Feature Class 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.

Field
to_date_field

The to date field in the Intersection Feature Class.

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

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

Sortie dérivée

NomExplicationType de données
out_feature_class

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

Feature Class

Exemple de code

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

Environnements

Cet outil n'utilise pas d’environnement de géotraitement.

Informations de licence

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

Rubriques connexes