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

  • Home
  • Get Started
  • Map
  • Analyze
  • Manage Data
  • Tools
  • Extensions

CreateFeatureLinkedAnnotation

  • 摘要
  • 说明
  • 语法
  • 代码示例

摘要

Creates annotation for features on specific charts if it does not already exist. If the annotation feature class exists, the features are appended to the existing feature class.

说明

As features are added to charts, annotation also needs to be added for these new features. This function can be used to append new annotation features to existing annotation feature classes based on what is in the chart. It can also create annotation for specific products based on the specified product library areas of interest and create advanced annotation such as Vertical Morse code.

语法

CreateFeatureLinkedAnnotation (aoi_info, data_frame, production_database, feature_class_list, {data_model})
参数说明数据类型
aoi_info

An AviationChartInfo object that contains the information for the MapID for the areas of interest to be processed. The MapID can be retrieved using the GetAviationAOI function and will be formatted as Solution Name::Product Class Name::Series Name::Product Name::Instance Name::AOI Name.

AviationChartInfo
data_frame

The data frame for which the annotation will be created.

DataFrame
production_database

The path to the Aviation geodatabase that contains the chart data.

String
feature_class_list
[feature_class_list,...]

The feature classes where annotation needs to be created. The information required includes the name of the annotation feature class and the annotation classes. This means the feature class and annotation classes must be provided in the following format: ["FeatureClass1::Anno Class1/Anno Class2", "FeatureClass2::Anno Class1/Anno Class2/Anno Class3"].

String
data_model

The data model used to determine whether the MapID or MapID_Txt field is used to get the annotation information. Possible values are AIS or DOD.

(默认值为 AIS)

String

代码示例

CreateFeatureLinkedAnnotation example

This sample script updates annotation for a single chart.

# Name: CreateFeatureLinkedAnnotation.py
# Description: Creates annotation for an Alaskan chart
# Author: Esri
# Date: July 2014

# Import arcpyproduction and aviation modules
import arcpy
import arcpyproduction
from arcpyproduction import aviation
from arcpyproduction.aviation import charting

# Check out Aviation license
arcpy.CheckOutExtension("Aeronautical")


# Define dictionary
mxdDictionary = {
    "c:/data/AK_H02.mxd": {
        "AK H-2":"Aeronautical::IFR_Enroute::AK High::AK H-2::AK H-2::AK H-2 AOI"},
    "c:/data/AK_H01.mxd": {
       "AK H-1":"Aeronautical::IFR_Enroute::AK High::AK H-1::AK H-1::AK H-1 AOI",
       "Seattle Inset":"Aeronautical::IFR_Enroute::AK High::AK H-1::Seattle Inset::Seattle Inset AOI"}}


# Set variables
prodLib = "c:/data/FAA_PL.sde"
prodDatabase = "c:/data/FAA_PD.sde"
annoFCs = ["ADHP_C_A::Default"]

# Define mapidListfrom the mxdDictionary defined above
mapidList = list(set(mapidValue for dataframeList in mxdDictionary.values() for mapidValue in dataframeList.values()))


# Get Aviation AOI
mapObjects = charting.GetAviationAOI(prodLib,mapidList)

# Create feature-linked annotation
for mxdLocation in mxdDictionary.keys():

   mxd = arcpy.mapping.MapDocument(mxdLocation)
   dataframes = arcpy.mapping.ListDataFrames(mxd)

   for dataframe in dataframes:
       if mxdDictionary[mxdLocation].has_key(dataframe.name) == 0:
           continue
       mapid = mxdDictionary[mxdLocation][dataframe.name]
       charting.CreateFeatureLinkedAnnotation(mapObjects[mapid], dataframe, prodDatabase, annoFCs, "AIS")


# Check in Aviation license
arcpy.CheckInExtension("Aeronautical")

相关主题

  • Creating feature-linked annotation using the Create Feature-Linked Annotation tool

ArcGIS Desktop

  • 主页
  • 文档
  • 支持

ArcGIS 平台

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

关于 Esri

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