Skip to main content

Shields

Краткая информация

Объект щитов набора сетевых данных предоставляет информацию о настройках щитов направлений для заданного источника ребра.

Свойства

Имя Объяснение Тип данных

combinedFieldName

(Только для чтения)

Имя поля, значения которого содержат полное описание адреса.

String

description

(Только для чтения)

Объект Описание щитов.

Object

descriptionCount

(Только для чтения)

Число щитов.

Integer

numberFieldName

(Только для чтения)

Имя поля, значения которого содержат номер дома.

String

typeFieldName

(Только для чтения)

Имя поля, значения которого содержат тип улицы.

String

useCombinedField

(Только для чтения)

Показывает, содержится ли информация о щитах в одном поле (True) или в двух полях (False).

Boolean

Пример кода

Пример свойств щитов

Отображение информации направлений щитов для каждого источника ребра в сетевом наборе данных.

# 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)")