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

  • ホーム
  • はじめに
  • マップ
  • 解析
  • データ管理
  • ツール
  • エクステンション

Append Events

Location Referencing ライセンスで利用可能です。

  • 概要
  • 使用法
  • 構文
  • コードのサンプル
  • 環境
  • ライセンス情報

概要

Appends event records from a table, layer, or feature class to an existing ArcGIS Roads and Highways event feature class.

使用法

  • An LRS dataset is required to run this tool.

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

    Learn more about fields required by the Roads and Highways events data model

  • The Target Event should be a layer or feature class registered with Roads and Highways.

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

  • If the Generate Event ID GUIDs for loaded events parameter is checked and you want GUIDs generated, either do not map the EventID field in the field mapping section or be sure to 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 Event ID GUIDs for loaded events parameter is checked, the value in the source event record EventID field will be loaded into the target event.

構文

arcpy.locref.AppendEvents(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 Roads and Highways event layer or feature class into which the source event records will be appended.

Feature Layer
field_mapping

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

Because the data of 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
(オプション)

Specifies how appended events with measure or temporality overlaps with identical Event IDs as Target Event records will be 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
(オプション)

Specifies whether event IDs will be generated for in_dataset records being appended. Generation of event IDs will only be applied to in_dataset records with a Null value for the Event ID field.

  • GENERATE_EVENT_IDS —Generates event IDs for the in_dataset records being appended.
  • NO_GENERATE_EVENT_IDS —Does not generate event IDs for the in_dataset records being appended. This is the default.
Boolean
generate_shapes
(オプション)

Specifies whether the shapes of the records being appended will be regenerated. This parameter is only enabled when the in_dataset is a feature layer or feature class.

  • GENERATE_SHAPES —The shapes of the input event features will be regenerated. This is the default.
  • NO_SHAPES —The shapes of the input event features will not be regenerated.
Boolean

派生した出力

名前説明データ タイプ
out_target_event

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

Feature Layer
out_details_file

A text file that details changes made by the tool.

Text File

コードのサンプル

AppendEvents example 1 (Python window)

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

# Name: AppendEvents_Inline_Example.py
# Description: Append event records into an existing Roads and Highways event feature class.

# set current workspace
arcpy.env.workspace = r"C:\NY_Data.gdb"

# tool variables
in_dataset = "AADT_Add"
in_event_featureclass = "AADT"
field_mapping = 'YEAR_ "YEAR_" true true false 2 Short 0 0 ,First,#,C:\NY_Data.gdb\AADT_Add,YEAR_,-1,-1;DISTRICT "DISTRICT" true true false 1 Text 0 0 ,First,#,C:\NY_Data.gdb\AADT_Add,DISTRICT,-1,-1;COSITE "COSITE" true true false 6 Text 0 0 ,First,#,C:\NY_Data.gdb\AADT_Add,COSITE,-1,-1;ROADWAY "ROADWAY" true true false 8 Text 0 0 ,First,#,C:\NY_Data.gdb\AADT_Add,ROADWAY,-1,-1;DESC_FRM "DESC_FRM" true true false 30 Text 0 0 ,First,#,C:\NY_Data.gdb\AADT_Add,DESC_FRM,-1,-1;DESC_TO "DESC_TO" true true false 30 Text 0 0 ,First,#,C:\NY_Data.gdb\AADT_Add,DESC_TO,-1,-1;AADT "AADT" true true false 4 Long 0 0 ,First,#,C:\NY_Data.gdb\AADT_Add,AADT,-1,-1;AADTFLG "AADTFLG" true true false 1 Text 0 0 ,First,#,C:\NY_Data.gdb\AADT_Add,AADTFLG,-1,-1;KFLG "KFLG" true true false 1 Text 0 0 ,First,#,C:\NY_Data.gdb\AADT_Add,KFLG,-1,-1;K100FLG "K100FLG" true true false 1 Text 0 0 ,First,#,C:\NY_Data.gdb\AADT_Add,K100FLG,-1,-1;DFLG "DFLG" true true false 1 Text 0 0 ,First,#,C:\NY_Data.gdb\AADT_Add,DFLG,-1,-1;TFLG "TFLG" true true false 1 Text 0 0 ,First,#,C:\NY_Data.gdb\AADT_Add,TFLG,-1,-1;BEGIN_POST "BEGIN_POST" true true false 8 Double 0 0 ,First,#,C:\NY_Data.gdb\AADT_Add,BEGIN_POST,-1,-1;END_POST "END_POST" true true false 8 Double 0 0 ,First,#,C:\NY_Data.gdb\AADT_Add,END_POST,-1,-1;KFCTR "KFCTR" true true false 8 Double 0 0 ,First,#,C:\NY_Data.gdb\AADT_Add,KFCTR,-1,-1;K100FCTR "K100FCTR" true true false 8 Double 0 0 ,First,#,C:\NY_Data.gdb\AADT_Add,K100FCTR,-1,-1;DFCTR "DFCTR" true true false 8 Double 0 0 ,First,#,C:\NY_Data.gdb\AADT_Add,DFCTR,-1,-1;TFCTR "TFCTR" true true false 8 Double 0 0 ,First,#,C:\NY_Data.gdb\AADT_Add,TFCTR,-1,-1;FromDate "FromDate" true true false 8 Date 0 0 ,First,#,C:\NY_Data.gdb\AADT_Add,FromDate,-1,-1;ToDate "ToDate" true true false 8 Date 0 0 ,First,#,C:\NY_Data.gdb\AADT_Add,ToDate,-1,-1;EventID "EventID" true true false 50 Text 0 0 ,First,#,C:\NY_Data.gdb\AADT_Add,EventID,-1,-1'
load_type = "RETIRE_OVERLAPS"
event_ids = "GENERATE_EVENT_IDS"
generate_shapes = "NO_SHAPES"

# execute the tool
arcpy.AppendEvents_locref(in_dataset, in_event_featureclass, field_mapping, load_type, event_ids, generate_shapes)
AppendEvents example 2 (stand-alone script)

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

# Name: AppendEvents.py
# Description: Append records into an existing Roads and Highways event feature class.

# Import arcpy module
import arcpy

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

# Local variables:
in_dataset  = "C:/NY_Data.gdb/AADT_Add"
in_target_event = "C:/NY_Data.gdb/LRSE_AADT"
field_mapping ='YEAR_ "YEAR_" true true false 2 Short 0 0 ,First,#,C:\NY_Data.gdb\AADT_Add,YEAR_,-1,-1;DISTRICT "DISTRICT" true true false 1 Text 0 0 ,First,#,C:\NY_Data.gdb\AADT_Add,DISTRICT,-1,-1;COSITE "COSITE" true true false 6 Text 0 0 ,First,#,C:\NY_Data.gdb\AADT_Add,COSITE,-1,-1;ROADWAY "ROADWAY" true true false 8 Text 0 0 ,First,#,C:\NY_Data.gdb\AADT_Add,ROADWAY,-1,-1;DESC_FRM "DESC_FRM" true true false 30 Text 0 0 ,First,#,C:\NY_Data.gdb\AADT_Add,DESC_FRM,-1,-1;DESC_TO "DESC_TO" true true false 30 Text 0 0 ,First,#,C:\NY_Data.gdb\AADT_Add,DESC_TO,-1,-1;AADT "AADT" true true false 4 Long 0 0 ,First,#,C:\NY_Data.gdb\AADT_Add,AADT,-1,-1;AADTFLG "AADTFLG" true true false 1 Text 0 0 ,First,#,C:\NY_Data.gdb\AADT_Add,AADTFLG,-1,-1;KFLG "KFLG" true true false 1 Text 0 0 ,First,#,C:\NY_Data.gdb\AADT_Add,KFLG,-1,-1;K100FLG "K100FLG" true true false 1 Text 0 0 ,First,#,C:\NY_Data.gdb\AADT_Add,K100FLG,-1,-1;DFLG "DFLG" true true false 1 Text 0 0 ,First,#,C:\NY_Data.gdb\AADT_Add,DFLG,-1,-1;TFLG "TFLG" true true false 1 Text 0 0 ,First,#,C:\NY_Data.gdb\AADT_Add,TFLG,-1,-1;BEGIN_POST "BEGIN_POST" true true false 8 Double 0 0 ,First,#,C:\NY_Data.gdb\AADT_Add,BEGIN_POST,-1,-1;END_POST "END_POST" true true false 8 Double 0 0 ,First,#,C:\NY_Data.gdb\AADT_Add,END_POST,-1,-1;KFCTR "KFCTR" true true false 8 Double 0 0 ,First,#,C:\NY_Data.gdb\AADT_Add,KFCTR,-1,-1;K100FCTR "K100FCTR" true true false 8 Double 0 0 ,First,#,C:\NY_Data.gdb\AADT_Add,K100FCTR,-1,-1;DFCTR "DFCTR" true true false 8 Double 0 0 ,First,#,C:\NY_Data.gdb\AADT_Add,DFCTR,-1,-1;TFCTR "TFCTR" true true false 8 Double 0 0 ,First,#,C:\NY_Data.gdb\AADT_Add,TFCTR,-1,-1;FromDate "FromDate" true true false 8 Date 0 0 ,First,#,C:\NY_Data.gdb\AADT_Add,FromDate,-1,-1;ToDate "ToDate" true true false 8 Date 0 0 ,First,#,C:\NY_Data.gdb\AADT_Add,ToDate,-1,-1;EventID "EventID" true true false 50 Text 0 0 ,First,#,C:\NY_Data.gdb\AADT_Add,EventID,-1,-1'

# Process: Append Events
arcpy.AppendEvents_locref(in_dataset, in_target_event, field_mapping, "ADD", "NO_GENERATE_EVENT_IDS", "GENERATE_SHAPES")

環境

  • 現在のワークスペース

ライセンス情報

  • 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. | プライバシー | リーガル