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 Source Directions Field Mapping

  • 描述
  • 属性
  • 代码示例

描述

网络源方向字段映射对象提供了与数据中的字段相关的信息,这些字段将映射到网络数据集方向配置中的特定属性。

属性

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

数据中映射至 key 属性中的指定属性的字段名称,映射目的在于在“至-自”方向(与数字化方向相反)上对线要素进行过渡。

String
alongField
(只读)

数据中映射至 key 属性中的指定属性的字段名称,映射目的在于在“自-至”方向(与数字化方向相同)上对线要素进行过渡。

String
key
(只读)

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

String
undirectedField
(只读)

数据中映射至 key 属性中的指定属性的字段名称,映射目的在于在所有行驶方向上进行过渡。

String

代码示例

网络源方向字段映射示例

# Name: NDSSourceDirectionsFieldMapping_ex01.py
# Description: Print information about the directions field mappings associated
#              with edge sources in the network dataset.

import arcpy
import sys

network = r"C:/Data/NetworkDatasetWithLandmarks.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 edge sources
sources = desc.edgeSources

#If there are no edge sources in the network dataset, quit.
if not sources:
    print("No edge sources")
    sys.exit()

#Loop through all the edge sources
for source in sources:
    print("\n--------------------")
    print("Edge source name: " , source.name)
    # Get the directions information specific to this edge source
    sDir = source.sourceDirections
    # Check if the edge source has turn and confirmation landmarks associated with it.
    # If so, print some information about the landmarks.
    if hasattr(sDir, "fieldMappings"):
        fieldMappings = sDir.fieldMappings
        print("\n--Field mapping information--")
        for fm in fieldMappings:
            print("\nProperty key:", fm.key)
            print("Along field name:", fm.alongField)
            print("Against field name:", fm.againstField)
            print("Undirected field name:", fm.undirectedField)
    else:
        print("Source does not directions field mappings.")

ArcGIS Desktop

  • 主页
  • 文档
  • 支持

ArcGIS

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

关于 Esri

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