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

  • 描述
  • 属性
  • 代码示例

描述

网络源方向对象将提供用于生成行驶方向(特定于网络数据集中的边源)的信息。

属性

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

包含生成行驶方向的行政区信息的字段名称。

如果没有为网络数据集定义行政区信息,则 adminAreaFieldName 属性将抛出异常。

String
fieldMappings
(只读)

返回此源的网络源方向字段映射对象列表。如果没有为此网络源定义字段映射,则 fieldMappings 属性将抛出异常。

Object
landmarkEventSources
(只读)

返回此源的地标源对象列表。如果没有为此网络源定义地标事件源(确认地标),则 landmarkEventSources 属性将抛出异常。

Object
landmarkManeuverSources
(只读)

返回此源的地标源对象列表。如果没有为此网络源定义地标行进源(转弯地标),则 landmarkManeuverSources 属性将抛出异常。

Object
streetNameFields
(只读)

返回此网络源的街道名称字段对象列表。

Object
shields
(只读)

返回盾形路牌符号对象。可利用该对象确定用于行驶方向中的盾形路牌符号属性。如果没有为网络数据集定义盾形路牌符号信息,则 shields 属性将抛出异常。

Object

代码示例

网络源方向属性示例

显示网络数据集中特定于边源的方向信息。

# Name: NDSNetworkSourceDirectionProperties_ex01.py
# Description: Print direction settings specific to edge sources in the network
#              dataset.

import arcpy
import sys

# Set the workspace
arcpy.env.workspace = "C:/Data/SanFrancisco.gdb/Transportation"

# Create Describe object for the network dataset
desc = arcpy.Describe("Streets_ND")

#If the directions are not set for the network dataset, exit 
if not desc.supportsDirections:
    print "No direction information"
    sys.exit() 

print "Source Direction Information ----" 

# 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 "--------------------" 
    print "Name: " , source.name 
    print "Source ID: " , source.sourceID  
    #Print the direction information specific to edge source    
    sDir = source.sourceDirections
    # Check if the administrative area information is defined for the network 
    #dataset. Otherwise adminAreaFieldName property throws an exception 
    if hasattr(sDir, "adminAreaFieldName"):    
        print "Administrative area field: " , sDir.AdminAreaFieldName 
    else:
        print "Administrative area field: " , "Not set"

ArcGIS Desktop

  • 主页
  • 文档
  • 支持

ArcGIS

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

关于 Esri

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