ArcGIS Desktop

  • ArcGIS Pro
  • ArcMap

  • My Profile
  • 帮助
  • Sign Out
ArcGIS Desktop

ArcGIS Online

专为贵组织打造的制图平台

ArcGIS Desktop

全面的专业性 GIS

ArcGIS Enterprise

面向企业的 GIS

ArcGIS Developers

用于构建位置感知应用程序的工具

ArcGIS Solutions

适用于行业的免费模板地图和应用程序

ArcGIS Marketplace

获取适用于组织的应用程序和数据

  • 文档
  • 支持
Esri
  • 登录
user
  • 我的个人资料
  • 登出

ArcMap

  • 主页
  • 入门
  • 地图
  • 分析
  • 管理数据
  • 工具
  • 扩展模块

Relocate Events

  • 描述
  • 使用方法
  • 语法
  • 代码示例
  • 环境
  • 许可信息

描述

Lists changes that have been made to event record measures during a period of time. External systems can use this information at regular intervals to sync to route edits in the ArcGIS Roads and Highways network.

This tool can be invoked at intervals to sync your external system with the LRS changes.

使用方法

  • This tool is intended to be published as a geoprocessing service for external event systems to periodically invoke. It will get measure changes to their events based on route edits in the Roads and Highways network.

  • Changing the geodatabase version of LRS Network layers in the map document before publishing the service may cause the service execution to fail.

  • The value provided for the Last Invoked Time parameter should be the date and time the external event system last invoked this web service and applied the returned event measure changes to its database. If no value is provided for this parameter, the event measure changes for all logged route edits in the LRS will be applied to the external events and returned in the response.

  • If the external event system does not support different geometry and measures for the same route across time (past or future), the LRS Time and Last LRS Time parameters must be set. Setting these parameters can ensure the tool does not return event measure changes that are effective in the future or past relative to the time view of the network that the external system supports. For example, if an external system only supports the current measures and geometry representation of a route, but the owners of the LRS have realigned a route effective in the system six months into the future, setting these time parameters can ensure the future event measure changes are not returned until the external system updates its route representations and stores them.

  • The LRS Time parameter tells Roads and Highways the time view of the LRS Network against which the external event system is measuring events. The Last LRS Time parameter tells Roads and Highways the LRS Time of the external system when it last invoked this web service and applied the returned event measure changes to its database. These two parameters ensure the event measure changes returned are appropriate to the time view of the LRS Network against which the external system is measuring events.

  • When you set LRS Time and Last LRS Time, along with Last Invoked Time, events will be relocated for all LRS edits that have occurred after the Last Invoked Time but only for those that are effective between the LRS Time and the Last LRS Time. It will also relocate events for LRS edits that occurred before the Last Invoked Time but are effective after the Last LRS Time.

  • This tool considers only LRS edits made using Roads and Highways version 10.2.2 or later.

  • The output dates are in epoch format.

语法

arcpy.locref.RelocateEvents(in_network, event_name, {last_invoked_time}, {lrs_time}, {last_lrs_time}, {output_format}, {export_file}, {out_features}, {include_event_geometry})
参数说明数据类型
in_network

The LRS Network for which route edits will be inspected.

Feature Layer
event_name

The LRS event layer to be relocated. The layer must be a registered external LRS event.

An error will be returned if this event layer does not belong to the network you have chosen.

String
last_invoked_time
(可选)

The last time this tool was executed. This value can be left empty or set to the Invoked Time output value from the previous execution of this tool. If you set this parameter, you will get events relocated for all LRS edits that have occurred after the Last Invoked Time. If you leave this value empty, you will get events relocated for all the LRS edits.

Date
lrs_time
(可选)

The LRS view date for which route edits will be inspected.

Date
last_lrs_time
(可选)

The LRS view date used for the previous execution of the tool.

Date
output_format
(可选)

The data format of the output event records.

  • CSV —Comma-separated values file. This is the default.
  • JSON —JavaScript Object Notation file.
  • FEATURE_CLASS —Geodatabase feature class.
String
export_file
(可选)

Location and name of an output CSV or JSON file. This parameter is required when Output Format is CSV or JSON.

File
out_features
(可选)

The feature class containing the output event records. This parameter is required when Output Format is FEATURE_CLASS.

Feature Class
include_event_geometry
(可选)

Determines whether event shapes will be included with the output event records. This parameter is ignored unless output_format is JSON or FEATURE_CLASS.

  • EXCLUDE_EVENT_GEOMETRY —Will not include the event geometry with the output export file or feature class. This is the default.
  • INCLUDE_EVENT_GEOMETRY —Will include the event geometry with the output export file or feature class.
Boolean

派生输出

名称说明数据类型
invoked_time

The database-specific time at which the tool is executed. This output can be used as the Last Invoked Time for the subsequent execution of this tool.

Date

代码示例

RelocateEvents example 1 (Python window)

The following Python window script demonstrates how to use the RelocateEvents function in immediate mode.

# Local variables:
Network = "MilePoint"
External_Event_Name = "FunctionalClass_External"
Last_Invoked = "3/11/2014 10:00:00 AM"
LRS_Time = ""
Last_LRS_Time = ""
Output_Format = "FEATURE_CLASS"
Export_File = ""
Output = "C:\RoadsAndHighways\RelocateOutput.gdb\RelocateFunctionalClass"
Event_Geometry = "INCLUDE_EVENT_GEOMETRY"

# Process: Relocate Events
arcpy.RelocateEvents_locref(Network, External_Event_Name, Last_Invoked, LRS_Time, Last_LRS_Time, Output_Format, Export_File, Output, Event_Geometry)
RelocateEvents example 2 (stand-alone script)

The following Python script demonstrates how to use the RelocateEvents function in stand-alone mode.

# Import arcpy module
import arcpy

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

# Local variables:
Network = "C:\RoadsAndHighways\Data\RH_DOT.gdb\LRSN_MilePoint"
External_Event_Name = "FunctionalClass_External"
Output_Format = "CSV"
Include_Event_Geometry = "false"
Output = "C:\RoadsAndHighways\RelocateOutput\RelocateFunctionalClass.csv"


# Process: Make Feature Layer
arcpy.MakeFeatureLayer_management(Network, "network_lyr")

# Process: Relocate Events
arcpy.RelocateEvents_locref("network_lyr", External_Event_Name, "", "", "", Output_Format, Output, "", Include_Event_Geometry)

环境

此工具不使用任何地理处理环境。

许可信息

  • Basic: 需要 Roads and Highways
  • Standard: 需要 Roads and Highways
  • Advanced: 需要 Roads and Highways

相关主题

  • An overview of the Location Referencing toolbox

ArcGIS Desktop

  • 主页
  • 文档
  • 支持

ArcGIS

  • ArcGIS Online
  • ArcGIS Desktop
  • ArcGIS Enterprise
  • ArcGIS
  • ArcGIS Developer
  • ArcGIS Solutions
  • ArcGIS Marketplace

关于 Esri

  • 关于我们
  • 招贤纳士
  • Esri 博客
  • 用户大会
  • 开发者峰会
Esri
分享您的想法。
Copyright © 2021 Esri. | 隐私政策 | 法律声明