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

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

Street Name Fields

  • 描述
  • 属性
  • 代码示例

描述

街道名称字段对象提供一些字段的信息,这些字段包含了在报告行驶方向时所用的街道名称。

属性

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

用于前缀方向的字段名称。

String
prefixTypeFieldName
(只读)

用于前缀类型的字段名称。

String
streetNameFieldName
(只读)

用于街道名称的字段名称。

String
suffixDirectionFieldName
(只读)

用于后缀方向的字段名称。

String
suffixTypeFieldName
(只读)

用于后缀类型的字段名称。

String
priority
(只读)

何时使用这些街道名称字段的优先级。默认值为 1。

Integer
fullNameFieldName
(只读)

用于存储整个街道名称的字段名称。

String
highwayDirectionFieldName
(只读)

用于高速公路方向的字段名称。

String
languageFieldName
(只读)

用于存储街道名称语言的字段名称。

String

代码示例

街道名称字段属性示例

显示在行驶方向中所用的街道名称字段的相关信息。

# Name: NDSStreetNameFieldsProperties_ex01.py
# Description: Print information about field names used to generate street names
#              in directions  

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 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
    # Get the street name fields for each source
    sStreetFields = sDir.streetNameFields 
    for sStreetField in sStreetFields:
        print "Prefix direction field: " , sStreetField.prefixDirectionFieldName
        print "Prefix type field: " , sStreetField.prefixTypeFieldName
        print "Street name field: " , sStreetField.streetNameFieldName
        print "Suffix direction field: " , sStreetField.suffixDirectionFieldName 
        print "Suffix type field: " , sStreetField.suffixTypeFieldName 
        print "Priority: " , sStreetField.priority
        print "Full name field: " , sStreetField.fullNameFieldName
        print "Highway direction field: ",sStreetField.highwayDirectionFieldName
        print "Language field: " , sStreetField.languageFieldName

ArcGIS Desktop

  • 主页
  • 文档
  • 支持

ArcGIS

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

关于 Esri

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