应用事件行为 (位置参考)

摘要

根据执行的路径编辑更新在输入网络中注册的所有事件要素类的事件位置。

事件根据配置的事件行为进行更新。

了解有关ArcGIS Pipeline Referencing 中配置事件行为ArcGIS Roads and Highways 中配置事件行为的更多信息

插图

应用事件行为工具说明

使用情况

参数

标注说明数据类型
输入路径要素

将更新其事件位置的 LRS 网络。 必须是向 LRS 注册为网络的要素图层。

Feature Layer

派生输出

标注说明数据类型
输出事件图层

已更新的事件图层。

Feature Layer
输出详细信息文件

详细说明工具所做更改的文本文件。

Text File

arcpy.locref.ApplyEventBehaviors(in_route_features)
名称说明数据类型
in_route_features

将更新其事件位置的 LRS 网络。 必须是向 LRS 注册为网络的要素图层。

Feature Layer

派生输出

名称说明数据类型
out_event_layers

已更新的事件图层。

Feature Layer
out_details_file

详细说明工具所做更改的文本文件。

Text File

代码示例

ApplyEventBehaviors 示例 1(独立脚本)

演示如何使用 ApplyEventBehaviors 函数作为独立 Python 脚本。

# Name: ApplyEventBehaviors_Pro_ex1.py
# Description: Processes event behaviors for events impacted by edits to the LRS Network in a stand-alone script.
# Requirements: ArcGIS Pipeline Referencing

# Import arcpy module
import arcpy

# Check out any necessary licenses
arcpy.CheckOutExtension("LocationReferencing")

# Tool variables
in_route_features = r"C:\Data\UPDM.gdb\LRS\P_StationSeriesNetwork"

# Execute the tool
arcpy.locref.ApplyEventBehaviors(in_route_features)

# Check in licenses
arcpy.CheckInExtension('LocationReferencing')
ApplyEventBehaviors 示例 2(Python 窗口)

演示如何在 Python 窗口中使用 ApplyEventBehaviors 函数。

# Name: ApplyEventBehaviors_ex2.py
# Description: Process event behaviors for events impacted by edits to the LRS Network in the Python window.
# Requires: ArcGIS Location Referencing

# Set tool variables
in_route_features = "Station_Series_Network"

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

# Execute the tool
arcpy.locref.ApplyEventBehaviors(in_route_features)
ApplyEventBehaviors 示例 3(独立脚本)

演示如何在要素服务中将 ApplyEventBehaviors 函数用作独立的 Python 脚本。

# Name: ApplyEventBehaviors_Pro_ex3.py
# Description: Processes event behaviors using a feature service. It is recommended to work in a version and post it into the default version.
# Requires: ArcGIS Location Referencing

# Import arcpy module
import arcpy

# Check out any necessary licenses.
arcpy.CheckOutExtension("LocationReferencing")

## Input LRS route network is in feature service.  Signing in portal is required to access the feature service.
arcpy.SignInToPortal('https://yourdomain.com/portal', 'username', 'password')

## Map the LRS network from the feature service. Here, 1 corresponds to the LRS network.
in_route_features = r"https://yourdomain.com/server/rest/services/FeatureServiceName/FeatureServer/1"

# Execute the tool
arcpy.locref.ApplyEventBehaviors(in_route_features)

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

许可信息

  • Basic: 需要 ArcGIS Location Referencing(ArcGIS Pipeline Referencing 或 ArcGIS Roads and Highways)
  • Standard: 需要 ArcGIS Location Referencing(ArcGIS Pipeline Referencing 或 ArcGIS Roads and Highways)
  • Advanced: 需要 ArcGIS Location Referencing(ArcGIS Pipeline Referencing 或 ArcGIS Roads and Highways)

相关主题