ArcGIS Desktop

  • ArcGIS Pro
  • ArcMap

  • My Profile
  • 帮助
  • Sign Out
ArcGIS Desktop

ArcGIS Online

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

ArcGIS Desktop

全面的专业性 GIS

ArcGIS Enterprise

面向企业的 GIS

ArcGIS for Developers

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

ArcGIS Solutions

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

ArcGIS Marketplace

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

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

ArcMap

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

Append Events

  • 摘要
  • 用法
  • 语法
  • 代码示例
  • 环境
  • 许可信息

摘要

Appends event records from a table, layer, or feature class into an existing event feature class.

旧版本:

This tool has been replaced by the ArcGIS Pro Append Events tool and will be deprecated in the next release.

用法

  • The Input Event can be a table, layer, or feature class.

  • This tool supports both point and polyline features. The feature type in the input and target event parameters should match.

  • For more information about the fields required in event feature classes, see the events data model.

  • If the Generate EventID GUIDs for loaded events option is checked and you want GUIDs generated, you should either not map the EventID field in the field mapping section or have Null records in the EventID column in the source event data. If the EventID field in a source event record is populated and the Generate EventID GUIDs for loaded events option is checked, the value in the source event record EventID field will be loaded into the target event.

语法

AppendEvents_locref (in_dataset, in_target_event, field_mapping, {load_type}, {generate_event_ids}, {generate_shapes})
参数说明数据类型
in_dataset

The source event records to append.

Table View
in_target_event

The event layer or feature class into which the source event records append.

Feature Layer
field_mapping

Controls how the attribute information in the fields of the in_dataset is transferred to the in_target_event.

Because the data of the in_dataset is appended into an existing event that has a predefined schema (field definitions), fields cannot be added or removed from the target dataset. While you can set merge rules for each output field, the tool ignores those rules.

The ArcPy FieldMappings class can be used to define this parameter.

Field Mappings
load_type
(可选)

Determines how appended events with measure or temporality overlaps with identical Event IDs as Target Event records are loaded into the event feature class.

  • ADD —Appends the Input Event records to the Target Event. No changes are made to Target Event records.
  • RETIRE_OVERLAPS —Appends the Input Event records to the Target Event and retires any records in the Target Event with measure or temporality overlaps as the appended events. If the appended event eclipses the Target Event, the Target Event will be deleted. This option should only be used for linear events.
  • RETIRE_BY_EVENT_ID —Appends the Input Event records to the Target Event and retires any records in the Target Event with the same Event ID and temporality overlaps as the appended events. If the appended event eclipses a Target Event with the same Event ID, the Target Event will be deleted.
  • REPLACE_BY_EVENT_ID —Appends the Input Event records to the Target Event and deletes any records in the Target Event with the same Event ID as the appended events.
String
generate_event_ids
(可选)

Indicates whether to generate Event IDs for in_dataset records being appended. Generation of Events IDs will only be applied to in_dataset records with a Null value for the Event ID field.

  • GENERATE_EVENT_IDS —Generates Event IDs of thein_dataset records being appended.
  • NO_GENERATE_EVENT_IDS —Does not generate Event IDs of the in_dataset records being appended. This is the default.
Boolean
generate_shapes
(可选)

Indicates whether to regenerate the shapes for the records being appended. This parameter is only active when the in_dataset is a feature layer or feature class.

  • GENERATE_SHAPES —Regenerates the shapes of the input event features. This is the default.
  • NO_SHAPES —Does not regenerate the shapes of the input event features.
Boolean

派生输出

名称说明数据类型
out_target_event

The event layer or feature class into which the source event records have been appended.

Feature Layer
out_details_file

Text file that details changes made by the tool.

Text File

代码示例

AppendEvents example 1 (Python window)

Demonstrates how to use the AppendEvents tool in the Python window.

# tool variables
in_dataset = "AdditionalSpeedLimit"
in_target_event = "LRSE_SpeedLimit"
field_mapping = ""
load_type = "RETIRE_OVERLAPS"
generate_event_ids = "GENERATE_EVENT_IDS"
generate_shapes = "NO_SHAPES"

# set current workspace
arcpy.env.workspace="C:/Data/NY_Data.gdb"

# execute the tool
AppendEvents_locref (in_dataset, in_target_event, field_mapping, load_type, generate_event_ids, generate_shapes)
AppendEvents example 2 (stand-alone script)

Demonstrates how to use the AppendEvents tool as a stand-alone Python script.

# Name: AppendEvents_standalone.py
# Description: Append records into an existing Pipeline Referencing event feature class.
# Requires: ArcGIS Pipeline Referencing

# Import arcpy module
import arcpy

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

# Local variables:
AdditionalDOTClass = "C:\\Data\\UPDM.gdb\\AdditionalDOTClass"
DOTClass = "C:\\Data\\NY_Data.gdb\\P_Integrity\\P_DOTClass"

# Process: Append Events
arcpy.AppendEvents_locref(AdditionalDOTClass, DOTClass, "", "RETIRE_OVERLAPS", "NO_GENERATE_EVENT_IDS", "GENERATE_SHAPES")

环境

  • 当前工作空间

许可信息

  • ArcGIS Desktop Basic: 需要 ArcGIS Pipeline Referencing
  • ArcGIS Desktop Standard: 需要 ArcGIS Pipeline Referencing
  • ArcGIS Desktop Advanced: 需要 ArcGIS Pipeline Referencing

ArcGIS Desktop

  • 主页
  • 文档
  • 支持

ArcGIS 平台

  • ArcGIS Online
  • ArcGIS Desktop
  • ArcGIS Enterprise
  • ArcGIS for Developers
  • ArcGIS Solutions
  • ArcGIS Marketplace

关于 Esri

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