摘要
网络数据集的盾形路牌符号对象将提供有关特定边源的方向盾形路牌符号的设置信息。
属性
属性 | 说明 | 数据类型 |
typeFieldName (只读) | 其值包含街道类型的字段名称。 | String |
numberFieldName (只读) | 其值包含门牌号的字段名称。 | String |
combinedFieldName (只读) | 其值包含整个地址描述的字段名称。 | String |
descriptionCount (只读) | 盾形路牌符号的数量。 | Integer |
description (只读) | 盾形路牌符号描述对象。 | Object |
代码示例
盾形路牌符号属性示例
显示网络数据集中每个边源的方向盾形路牌符号信息。
# Name: NDSShieldsProperties_ex01.py
# Description: Print information about directions shields for each edge source
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
#Get the direction information specific to edge source
sDir = source.sourceDirections
#Get the shields for each source
shields = sDir.shields
if shields:
print "Shield type field: " , shields.typeFieldName
print "Number field:" , shields.numberFieldName
print "Combined field: " , shields.combinedFieldName
print "Description count: " , shields.descriptionCount
else:
print "(No shield information)"