Skip to main content

Свойства сети трассировки

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

Функция Describe возвращает следующие свойства сети трассировки.

Сеть трассировки возвращает dataType из "TraceNetwork".

Более подробно о сети трассировки

Свойства

Свойство Объяснение Тип данных

associationSource

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

Объект associationSource. Объект может использоваться для получения свойств источников соединений.

Object

createDirtyAreaForAnyAttributeUpdate

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

Создаются ли измененные области в случае обновлении атрибутов при включенной топологии сети.

  • True - измененные области создаются при изменении атрибутов.

  • False - измененные области не создаются при изменении атрибутов.

Boolean

creationTime

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

Дата и время создания сети трассировки.

DateTime

globalID

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

Global ID сети трассировки.

String

minimalDirtyAreaSize

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

Минимальный размер измененных областей топологии сети.

Integer

networkAttributes

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

Объект networkAttributes. Объект может использоваться для получения свойств атрибутов сети.

Object

proVersion

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

Версия ArcGIS Pro, используемая для построения сети трассировки.

String

schemaGeneration

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

Значение создания схемы для входной сети трассировки.

Integer

sources

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

Объект sources. Объект может использоваться для получения свойств источников сети трассировки.

Object

systemJunctionSource

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

Объект systemJunctionSource. Объект может использоваться для получения свойств источников системных соединений.

Object

Пример кода

Пример свойств сети трассировки (автономный скрипт)

Этот автономный скрипт PythonPython выводит отчет о некоторых свойствах сетей трассировки.

'''****************************************************************************
Name:        DescribeTraceNetworkProperties.py
Description: This script reports the properties of a trace network
Created by:  Esri
****************************************************************************'''

# Import required modules
import arcpy

# Describe function on a Trace Network
TN = (r"C:\MyProject\MyNetworkData.gdb\FDS\HydroNetwork")
d = arcpy.Describe(TN)

# Top level TN properties
print("Creation Time: {0}".format(d.creationTime))
print("Pro Version: {0}".format(d.proVersion))
print("Global ID: {0}".format(d.globalId))
print("Schema generation: {0}".format(d.schemaGeneration))
print("Minimal dirty area size: {0}".format(d.minimalDirtyAreaSize))
print("Create Dirty Area For Any Attribute Update: {0}\n".format(d.createDirtyAreaForAnyAttributeUpdate))

# Association source properties
asources = d.associationSource
print("*** - Assocation Sources properties - ***")
print("Name: {0}".format(asources.name))
print("ID: {0}".format(asources.sourceID))
print("Type: {0} \n".format(asources.sourceType))

# System junction source properties
sjsources = d.systemJunctionSource
print("*** - System Junction Source properties - ***")
print("Name: {0}".format(sjsources.name))
print("ID: {0}".format(sjsources.sourceID))
print("Type: {0} \n".format(sjsources.sourceType))

# Source properties
sources = d.sources
for s in sources:
    print("*** - Sources properties - ***")
    print("Name: {0}".format(s.name))
    print("ID: {0}".format(s.sourceID))
    print("Source Type: {0} \n".format(s.sourceType))
    print("Element Type: {0} \n".format(s.elementType))
    cp = s.connectivityPolicies
    print("Connectivity Policy: {0} \n".format(cp.classConnectivity))

# Network Attribute properties
netattrs = d.networkAttributes
for na in netattrs:
    print("*** - Network Attribute properties - ***")
    print("ID: {0}".format(na.Id))
    print("Name: {0}".format(na.name))
    print("Data Type: {0}".format(na.dataType))
    print("Usage Type: {0}".format(na.usageType))
    print("isEmbedded: {0}".format(na.isEmbedded))
    print("isApportionable: {0}".format(na.isApportionable))
    print("bitPosition: {0}".format(na.bitPosition))
    print("bitSize: {0}".format(na.bitSize))
    print("Junction Weight ID: {0}".format(na.junctionWeightId))
    print("Edge Weight ID: {0} \n".format(na.edgeWeightId))

    # For each attribute assignment in the attribute assignments object:
    try:
        tnas = na.assignments
        for tna in tnas:
            print(" -- Attribute Assignment Properties -- ")
            print("Trace Network Assignment Attribute ID: {0}".format(tna.attributeId))
            print("Trace Network Assignment Attribute Source Name: {0} \n".format(tna.networkSourceName))
            # For each field evaluator in the attribute evaluator object:
            print(" - Field Evaluator Properties - ")
            fe = tna.evaluator
            print("Field Evaluator Type: {0}".format(fe.evaluatorType))
            print("Field Evaluator Name: {0} \n".format(fe.fieldName))
    except:
        print("{0} does not have any attribute assignments \n".format(na.name))