ArcGIS for Desktop

  • Документация
  • Стоимость
  • Поддержка

  • My Profile
  • Справка
  • Sign Out
ArcGIS for Desktop

ArcGIS Online

Картографическая платформа вашей организации

ArcGIS for Desktop

Полноценная профессиональная ГИС

ArcGIS for Server

ГИС предприятия

ArcGIS for Developers

Инструменты для встраивания приложений с местоположениями

ArcGIS Solutions

Бесплатные шаблоны карт и приложений для отрасли

ArcGIS Marketplace

Получение приложения и данных для вашей организации.

  • Документация
  • Стоимость
  • Поддержка
Esri
  • Войти
user
  • Мой профиль
  • Выход

Help

  • На главную
  • Начало работы
  • Карта
  • Анализ
  • Управление данными
  • Инструменты
  • Больше...

Append Events

  • Краткая информация
  • Использование
  • Синтаксис
  • Пример кода
  • Параметры среды
  • Информация о лицензировании

Краткая информация

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

Использование

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

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

  • 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 Esri Roads and Highways event feature classes, see the Events Data Model.

Синтаксис

AppendEvents_roads (in_dataset, in_target_event, field_mapping, load_type, {generate_event_ids}, {generate_shapes})
ПараметрОбъяснениеТип данных
in_dataset

The source event records to append.

Table or Feature Layer
in_target_event

The Esri Roads and Highways event layer or feature class that the source event records append into.

Feature Layer
field_mapping

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

Because the in_dataset's data 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.

You can use the ArcPy FieldMappings class to define this parameter.

Field Mapping
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 the 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_GENERATE_SHAPES —Does not regenerate the shapes of the input event features.
Boolean

Пример кода

AppendEvents example 1 (Python window)

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

# tool variables
in_dataset="AdditionalSpeedLimit"
in_event_featureclass="LRSE_SpeedLimit"
in_fields="EventID \"EventID\" true true false 50 Text 0 0 ,First,#,C:\\Data\\NY_Data.gdb\\AdditionalSpeedLimit,EventID,0,0;FromDate \"FromDate\" true true false 8 Date 0 0 ,First,#,C:\\Data\\NY_Data.gdb\\AdditionalSpeedLimit,FromDate,0,0;ToDate \"ToDate\" true true false 8 Date 0 0 ,First,#,C:\\Data\\NY_Data.gdb\\AdditionalSpeedLimit,ToDate,0,0;RouteID \"RouteID\" true true false 8 Text 0 0 ,First,#,C:\\Data\\NY_Data.gdb\\AdditionalSpeedLimit,RouteID,0,0;FromMeasure \"FromMeasure\" true true false 8 Double 0 0 ,First,#,C:\\Data\\NY_Data.gdb\\AdditionalSpeedLimit,FromMeasure,0,0;ToMeasure \"ToMeasure\" true true false 8 Double 0 0 ,First,#,C:\\Data\\NY_Data.gdb\\AdditionalSpeedLimit,ToMeasure,0,0;SpeedLimit \"SpeedLimit\" true true false 2 Short 0 0 ,First,#,C:\\Data\\NY_Data.gdb\\AdditionalSpeedLimit,SpeedLimit,0,0"
generate_shapes="NO_GENERATE_SHAPES"

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

# execute the tool
arcpy.AppendEvents_roads("AdditionalSpeedLimit", "LRSE_SpeedLimit", "EventID \"EventID\" true true false 50 Text 0 0 ,First,#,C:\\Data\\NY_Data.gdb\\AdditionalSpeedLimit,EventID,0,0;FromDate \"FromDate\" true true false 8 Date 0 0 ,First,#,C:\\Data\\NY_Data.gdb\\AdditionalSpeedLimit,FromDate,0,0;ToDate \"ToDate\" true true false 8 Date 0 0 ,First,#,C:\\Data\\NY_Data.gdb\\AdditionalSpeedLimit,ToDate,0,0;RouteID \"RouteID\" true true false 8 Text 0 0 ,First,#,C:\\Data\\NY_Data.gdb\\AdditionalSpeedLimit,RouteID,0,0;FromMeasure \"FromMeasure\" true true false 8 Double 0 0 ,First,#,C:\\Data\\NY_Data.gdb\\AdditionalSpeedLimit,FromMeasure,0,0;ToMeasure \"ToMeasure\" true true false 8 Double 0 0 ,First,#,C:\\Data\\NY_Data.gdb\\AdditionalSpeedLimit,ToMeasure,0,0;SpeedLimit \"SpeedLimit\" true true false 2 Short 0 0 ,First,#,C:\\Data\\NY_Data.gdb\\AdditionalSpeedLimit,SpeedLimit,0,0", "RETIRE_OVERLAPS", "GENERATE_EVENT_IDS", "NO_GENERATE_SHAPES")
AppendEvents example 2 (stand-alone Python script)

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

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

# Import arcpy module
import arcpy

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

# Local variables:
AdditionalSpeedLimit = "C:\\Data\\NY_Data.gdb\\AdditionalSpeedLimit"
SpeedLimit = "C:\\Data\\NY_Data.gdb\\LRSE_SpeedLimit"

# Process: Append Events
arcpy.AppendEvents_roads(AdditionalSpeedLimit, SpeedLimit, "EventID \"EventID\" true true false 50 Text 0 0 ,First,#,C:\\Data\\NY_Data.gdb\\AdditionalSpeedLimit,EventID,0,0;FromDate \"FromDate\" true true false 8 Date 0 0 ,First,#,C:\\Data\\NY_Data.gdb\\AdditionalSpeedLimit,FromDate,0,0;ToDate \"ToDate\" true true false 8 Date 0 0 ,First,#,C:\\Data\\NY_Data.gdb\\AdditionalSpeedLimit,ToDate,0,0;RouteID \"RouteID\" true true false 8 Text 0 0 ,First,#,C:\\Data\\NY_Data.gdb\\AdditionalSpeedLimit,RouteID,0,0;FromMeasure \"FromMeasure\" true true false 8 Double 0 0 ,First,#,C:\\Data\\NY_Data.gdb\\AdditionalSpeedLimit,FromMeasure,0,0;ToMeasure \"ToMeasure\" true true false 8 Double 0 0 ,First,#,C:\\Data\\NY_Data.gdb\\AdditionalSpeedLimit,ToMeasure,0,0;SpeedLimit \"SpeedLimit\" true true false 2 Short 0 0 ,First,#,C:\\Data\\NY_Data.gdb\\AdditionalSpeedLimit,SpeedLimit,0,0", "ADD", "NO_GENERATE_EVENT_IDS", "GENERATE_SHAPES")

Параметры среды

  • Текущая рабочая область (Current Workspace)

Информация о лицензировании

  • ArcGIS for Desktop Basic: Требует Roads and Highways
  • ArcGIS for Desktop Standard: Требует Roads and Highways
  • ArcGIS for Desktop Advanced: Требует Roads and Highways

Связанные темы

  • An overview of the Roads and Highways toolbox

ArcGIS for Desktop

  • На главную
  • Документация
  • Стоимость
  • Поддержка

ArcGIS Platform

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

Об Esri

  • О нас
  • Карьера
  • Блог сотрудников
  • Конференция пользователей
  • Саммит разработчиков
Esri
Расскажите нам, что вы думаете.
© Copyright 2016 Environmental Systems Research Institute, Inc. | Конфиденциальность | Правовая информация