Skip to main content

Network Directions

汇总

网络数据集的网络方向对象提供了有关网络数据集级别的方向设置信息,例如用于生成方向的输出长度单位或长度属性。

属性

名称 说明 数据类型

attributeMappings

(只读)

返回此源的 Network Directions Attribute Mapping 对象列表。如果未为此网络定义属性映射,则 attributeMappings 属性将引发异常。

Object

defaultOutputLengthUnits

(只读)

在报告行驶方向上的距离时会用到的默认长度单位。

String

lengthAttributeName

(只读)

用于报告行驶距离的网络属性的名称。

String

referenceLandmarkSourceNames

(只读)

包含参考地标的表名称的列表。如果没有参考地标表,请返回 None 。

String

roadClassAttributeName

(只读)

用于道路分类的网络属性的名称。

String

roadSplitsTableName

(只读)

包含道路分割的表的名称。

String

signpostFeatureClassName

(只读)

包含路标的要素类名称。

String

signpostStreetsTableName

(只读)

包含路标街道参考的索引表名称。

String

timeAttributeName

(只读)

用于报告行驶时间的网络属性的名称。

String

代码示例

网络方向属性示例

显示网络数据集方向信息的摘要。

# Name: NDSDirectionProperties_ex01.py
# Description: Print direction setting for 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")

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

print("Direction Information ----")
print("Length attribute name: " , direction.lengthAttributeName)
print("Time attribute name: " , direction.timeAttributeName)
print("Road Class attribute name: " , direction.roadClassAttributeName)
print("Default Output Length Units: " , direction.defaultOutputLengthUnits)
print("Signpost Feature Class: " , direction.signPostFeatureClassName)
print("Signpost Streets Table: " , direction.signpostStreetsTableName)