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

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

Network Directions Attribute Mapping

  • 描述
  • 属性
  • 代码示例

描述

Network Directions Attribute Mapping 对象提供有关网络数据集中描述符属性的信息,这些属性将被映射到网络数据集方向配置中的特定属性。

属性

属性说明数据类型
attribute
(只读)

映射到由 key 属性所描述的方向属性的网络属性名称。

String
key
(只读)

网络数据集属性所映射到的网络数据集方向属性的名称。

String

代码示例

网络方向属性映射属性示例

打印网络数据集的方向属性映射属性。

# Name: NDSDirectionsAttributeMapping_ex01.py
# Description: Print information about the directions attribute mappings
#              for the network dataset.
import arcpy
import sys
network = r"C:/Data/NetworkDatasetWithDirections.gdb/Transportation/Streets_ND"
# Create Describe object for the network dataset
desc = arcpy.Describe(network)
# If the directions are not set for the network dataset, exit
if not desc.supportsDirections:
    print("No direction information")
    sys.exit()
# Get all the network's directions properties
directions = desc.directions
# Loop through the attribute mappings
if hasattr(directions, "attributeMappings"):
    attrMappings = directions.attributeMappings
    for mapping in attrMappings:
        print("\nKey:", mapping.key)
        print("Attribute:", mapping.attribute)
else:
    print("Network dataset does not contain directions attribute mappings.")

ArcGIS Desktop

  • 主页
  • 文档
  • 支持

ArcGIS

  • ArcGIS Online
  • ArcGIS Desktop
  • ArcGIS Enterprise
  • ArcGIS
  • ArcGIS Developer
  • ArcGIS Solutions
  • ArcGIS Marketplace

关于 Esri

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