Overlay Events (Location Referencing)

适用于 Location Referencing 许可。

摘要

Overlays one or more linear event feature layers onto a target network and outputs a feature class or table that represents the dynamic segmentation of the inputs.

使用情况

  • All input Event Layers must be line events.

  • The Event Layers parameter can only include linear event feature classes registered with an ArcGIS Location Referencing network.

  • If the input events use different linear referencing methods (LRM), they will be translated using the LRM of the target network.

  • This tool supports selection sets.

  • This tool supports definition filters.

  • This tool supports input Event Layers that are configured to contain events that span multiple routes. The output will still dynamically segment at the route level of the target network using the Network Fields parameter.

  • This tool supports temporal segmentation (time slicing). This will occur by default and can be overridden by creating a time-based definition query or applying a selection set to the inputs.

  • This tool supports including one or more fields from the network feature class in the output using the Network Fields parameter.

  • The output can be saved as either a table or a feature class.

  • If saved as a table or feature class, the output will have the following indexes and fields:

    IndexField

    Route_ID

    • Route_ID

    Rid_Dates_Me

    • Route_ID
    • From_Date
    • To_Date
    • From_Measure
    • To_Measure

  • If the target LRS Network is configured as a line network with support for a multifield route ID, the following parameters are not required for appending routes:

    • Route Name Field
    • Line Name Field

  • This tool supports the Gas Utility Network Configuration pipeline feature layer as an input event layer if this feature class has been configured for use with an LRS using the Configure Utility Network Feature Class tool.

  • If more than one LRS Network exists in the Gas Utility Network Configuration, the measures for the input event layers will match the measures shown in the right column of the table below.

    If the LRS with the Gas Utility Network Configuration containsThe measures in the PipelineLine feature class belong to

    Line network, nonline network

    Line network

    Line network

    Line network

    More than one line network

    Line network that has the derived network

    More than one line network with no derived network

    Line network that has the lowest number in the coded-value domain, dLRSNetworks

    More than one line network with derived networks

    Line network that has the lowest number in the coded-value domain, dLRSNetworks

    One nonline network

    Nonline network

    More than one nonline network

    Network that has the lowest number in the coded-value domain, dLRSNetworks

  • 该工具支持将具有物理间隙的路线和事件分别用作输入路线和输入事件。

参数

标注说明数据类型
Input Route Features

The target network onto which the event layers will be dynamically segmented.

Feature Layer
Event Layers

The event layers to be dynamically segmented together onto a target network.

Feature Layer
Output Dataset

The table or feature class to be created, containing the output event records.

Table
Include Geometry
(可选)

Specifies whether the Output Dataset will include event geometry.

  • Unchecked—The Output Dataset will not include event geometry. Event records will be stored as a table. This is the default.
  • Checked—The Output Dataset will include event geometry. Event records will be stored as a feature class.
Boolean
Network Fields
(可选)

Fields from the network layer that will be included in the output.

Field

arcpy.locref.OverlayEvents(in_route_features, event_layers, output_dataset, {include_geometry}, {network_fields})
名称说明数据类型
in_route_features

The target network onto which the event layers will be dynamically segmented.

Feature Layer
event_layers
[event_layers,...]

The event layers to be dynamically segmented together onto a target network.

Feature Layer
output_dataset

The table or feature class to be created, containing the output event records.

Table
include_geometry
(可选)

Specifies whether the output_dataset will include event geometry.

  • EXCLUDE_GEOMETRYThe output_dataset will not include event geometry. Event records will be stored as a table. This is the default.
  • INCLUDE_GEOMETRYThe output_dataset will include event geometry. Event records will be stored as a feature class.
Boolean
network_fields
[network_fields,...]
(可选)

Fields from the network layer that will be included in the output.

Field

代码示例

OverlayEvents example 1 (Python window)

The following Python window script demonstrates how to use the OverlayEvents tool in the Python window.

# Name: OverlayEvents_ex1.py
# Description: Overlays linear event feature layers against a target network and output a feature class or table that represents the dynamic segmentation of those inputs.
# Requirements: ArcGIS Location Referencing

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

# tool variables
in_route_features = r"C:\Data\NY_Data.gdb\LRS\LRSN_MilePoint"
event_layers = [r"C:\Data\NY_Data.gdb\LRS\LRSE_Access_Control", r"C:\Data\NY_Data.gdb\LRS\LRSE_Functional_Class"]
output_dataset = r"C:\Data\NY_Data.gdb\LRS\Output"
include_geometry = "EXCLUDE_GEOMETRY"
network_fields = ""

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

# Execute the tool
arcpy.OverlayEvents_locref(in_route_features, event_layers, output_dataset, include_geometry, network_fields)

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

The following Python script demonstrates how to use the OverlayEvents tool in a stand-alone Python script:

# Name: OverlayEvents_ex2.py
# Description: Overlay linear event feature layers against a target network then output a feature class or table that represents the dynamic segmentation of those inputs.
# Requires: ArcGIS Location Referencing
 
# Import arcpy module
import arcpy
 
# Check out license
arcpy.CheckOutExtension("LocationReferencing")

# Local variables:
Network = r"C:\Data\NY_Data.gdb\LRS\LRSN_MilePoint"
Events = [r"C:\Data\NY_Data.gdb\LRS\LRSE_Access_Control", r"C:\Data\NY_Data.gdb\LRSE_Functional_Class"]
Output_Dataset = r"C:\Data\NY_Data.gdb\LRS\Output"
Geometry = "EXCLUDE_GEOMETRY"
Network_Fields = ""

# Process: Overlay Events
arcpy.OverlayEvents_locref(Network, Events, Output_Dataset, Geometry, Network_Fields)

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

The following stand-alone script demonstrates how to use the OverlayEvents tool in a feature service:

# Name: OverlayEvents_Pro_Ex3.py
# Description: Overlay events using a feature service. It is recommended to work in a version and post to the default version.
# Requires: ArcGIS Location Referencing
 
# Import arcpy module
import arcpy
 
# Check out license
arcpy.CheckOutExtension("LocationReferencing")

#Input LRS network and events are in feature service. Portal signi is required to access the feature service.
arcpy.SignInToPortal('https://yourdomain.com/portal', 'username', 'password')

# Map the input LRS network and events from the feature service. Here, 1 corresponds to the input LRS network and 2 and 3 corresponds to input events.
in_network  = r"https://yourdomain.com/server/rest/services/FeatureServiceName/FeatureServer/1"
event1 = r"https://yourdomain.com/server/rest/services/FeatureServiceName/FeatureServer/2"
event2 = r"https://yourdomain.com/server/rest/services/FeatureServiceName/FeatureServer/3"
in_events = [event1, event2]

# Set tool variables
Output_Dataset = r"C:\Data\LocationReferencing.gdb\LRS\output"
Geometry = "EXCLUDE_GEOMETRY"
Network_Fields = ""

# Process: Overlay Events.
arcpy.OverlayEvents_locref(in_network, in_events, Output_Dataset, Geometry, Network_Fields)

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

环境

特殊情况

许可信息

  • Basic: 需要 ArcGIS Location Referencing
  • Standard: 需要 ArcGIS Location Referencing
  • Advanced: 需要 ArcGIS Location Referencing

相关主题