Network Source Directions
汇总
网络源方向对象可提供用于生成特定于网络数据集中边源的行驶方向的信息。
属性
| 名称 | 说明 | 数据类型 |
|---|---|---|
|
adminAreaFieldName (只读) |
包含生成行驶方向的行政区信息的字段名称。 如果没有为网络数据集定义行政区信息,则 |
String |
|
fieldMappings (只读) |
返回此源的 网络源方向字段映射 对象列表。如果没有为此网络源定义字段映射,则 |
Object |
|
landmarkEventSources (只读) |
返回此源的 地标源 对象列表。如果没有为此网络源定义地标事件源(确认地标),则 |
Object |
|
landmarkManeuverSources (只读) |
返回此源的 地标源 对象列表。如果没有为此网络源定义地标行进源(转弯地标),则 |
Object |
|
streetNameFields (只读) |
返回此网络源的 街道名称字段 对象列表。 |
Object |
|
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")