Relocate Events (Roads and Highways)

许可等级:BasicStandardAdvanced

摘要

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 themselves to a route in the Roads and Highways network.

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

用法

语法

RelocateEvents_roads (in_network, event_name, {last_invoked_time}, {lrs_time}, {last_lrs_time}, {output_format}, {export_file}, {out_features}, {include_event_geometry}, invoked_time)
参数说明数据类型
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 time value of the last time this tool was executed. This value may 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 left 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.

  • CSVComma-separated values file. This is the default.
  • JSONJavaScript Object Notation file.
  • FEATURE_CLASSGeodatabase feature class.
String
export_file
(可选)

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

File
out_features
(可选)

The feature class containing the output event records. This parameteris 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_GEOMETRYWill not include the event geometry with the output export file or feature class. This is the default.
  • INCLUDE_EVENT_GEOMETRYWill 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"
Output_Format = "FEATURE_CLASS"
Output = "C:\RoadsAndHighways\RelocateOutput.gdb\RelocateFunctionalClass"

# Process: Relocate Events
arcpy.RelocateEvents_roads(Network, External_Event_Name, "3/11/2014 10:00:00 AM", "", "", Output_Format, "", Output, "INCLUDE_EVENT_GEOMETRY")
RelocateEvents example 2 (stand-alone mode)

The following Python window 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_roads("network_lyr", External_Event_Name, "", "", "", Output_Format, Output, "", Include_Event_Geometry)

环境

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

相关主题

许可信息

ArcGIS for Desktop Basic: 需要 Roads and Highways
ArcGIS for Desktop Standard: 需要 Roads and Highways
ArcGIS for Desktop Advanced: 需要 Roads and Highways
4/27/2014