公共设施网络属性

摘要

Describe 函数将返回公共设施网络的以下属性。

公共设施网络将返回 "Utility Network"dataType

了解有关公共设施网络的详细信息

属性

属性说明数据类型
associationSource
(只读)

associationSource 对象。 此对象可用于检索关联源的属性。

Object
categories
(只读)

categories 对象。 此对象可用于检索公共设施网络类别的属性。

Object
createDirtyAreaForAnyAttributeUpdate
(只读)

在启用了网络拓扑的情况下,是否针对任何属性更新创建脏区。

  • True - 将针对任何属性更新创建脏区。
  • False - 不会针对任何属性更新创建脏区。

Boolean
creationTime
(只读)

公共设施网络的创建日期和时间。

DateTime
domainNetworks
(只读)

domainNetworks 对象。 此对象可用于检索域网络的属性。

Object
globalID
(只读)

公共设施网络的全局 ID。

String
minimalDirtyAreaSize
(只读)

网络拓扑中脏区的最小大小。

Integer
networkAttributes
(只读)

networkAttributes 对象。 此对象可用于检索网络特性的属性。

Object
proVersion
(只读)

用于构建公共设施网络的 ArcGIS Pro 版本。

String
schemaGeneration
(只读)

输入公共设施网络的方案生成值。

Integer
serviceTerritoryFeatureClassName
(只读)

面要素类的名称用于设置公共设施网络的范围。

String
systemJunctionObjectSource
(只读)

systemJunctionObjectSource 对象。 此对象可用于检索系统交汇点对象源的属性。

Object
systemJunctionSource
(只读)

systemJunctionSource 对象。 此对象可用于检索系统交汇点源的属性。

Object
terminalConfigurations
(只读)

terminalConfigurations 对象。 此对象可用于检索终端配置的属性。

Object

代码示例

公共设施网络属性示例(独立脚本)

以下独立 Python 脚本可打印某些公共设施网络属性的报告。

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

# Import required modules
import arcpy

# Describe function on a Utility Network
UN = "C:\\MyProject\\databaseConn.sde\\mygdb.USER1.Naperville\\mygdb.USER1.ElectricNetwork"
d = arcpy.Describe(UN)

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

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

# System junction object source properties
sjosources = d.systemJunctionObjectSource
print("*** - System Junction Object Source properties - ***")
print(f"ID: {sjosources.sourceID}")

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

# Domain Network properties
domnets = d.domainNetworks
for dom in domnets:
    print("*** - Domain Network properties - ***")
    print(f"Creation Time: {dom.creationTime}")
    print(f"Release Number: {dom.releaseNumber}")
    print(f"Is Structure Network: {dom.isStructureNetwork}")
    print(f"Domain Network ID: {dom.domainNetworkId}")
    print(f"Domain Network Name: {dom.domainNetworkName}")
    print(f"Domain Network Alias Name: {dom.domainNetworkAliasName}")
    print(f"Subnetwork Table Name: {dom.subnetworkTableName}")
    print(f"Subnetwork Label Field Name: {dom.subnetworkLabelFieldName}")
    print(f"Tier Definition: {dom.tierDefinition}")
    print(f"Subnetwork Controller Type: {dom.subnetworkControllerType} \n")

# Network Attribute properties
netattrs = d.networkAttributes
for na in netattrs:
    print("*** - Network Attribute properties - ***")
    print(f"ID: {na.Id}")
    print(f"Name: {na.name}")
    print(f"Network Attribute To Substitute: {na.networkAttributeToSubstitute}")
    print(f"Data Type: {na.dataType}")
    print(f"Field Type: {na.fieldType}")
    print(f"Usage Type: {na.usageType}")
    print(f"isEmbedded: {na.isEmbedded}")
    print(f"isApportionable: {na.isApportionable}")
    print(f"isOverridable: {na.isOverridable}")
    print(f"isSubstitution: {na.isSubstitution}")
    print(f"Domain name: {na.domainName}")
    print(f"bitPosition: {na.bitPosition}")
    print(f"bitSize: {na.bitSize}")
    print(f"Junction Weight ID: {na.junctionWeightId}")
    print(f"Edge Weight ID: {na.edgeWeightId} \n")

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

# Terminal Configuration properties
termconfigs = d.terminalConfigurations
for tc in termconfigs:
    print("*** - Terminal Configuration Properties - ***")
    print(f"ID: {tc.terminalConfigurationId}")
    print(f"Name: {tc.terminalConfigurationName}")
    print(f"Traversability Model: {tc.traversabilityModel}")
    print(f"Default Configuration: {tc.defaultConfiguration} \n")

    # For each terminal in the terminals object:
    for t in tc.terminals:
        print(" -- Terminal Properties -- ")
        print(f"Terminal ID: {t.terminalId}")
        print(f"Terminal Name: {t.terminalName}")
        print(f"Terminal Is Upstream: {t.isUpstreamTerminal} \n")

    # For each configuration in the valid configurations object:
    try:
        for lc in tc.validConfigurationPaths:
            print(" - Configuration Properties - ")
            print(f"Configuration Id: {lc.terminalConfigurationID}")
            print(f"Configuration Name: {lc.name}")
            print(f"Description: {lc.description} \n")
            try:
                for tp in lc.terminalPaths:
                    print(f"From terminal id: {tp.fromTerminalId}")
                    print(f"To terminal id: {tp.toTerminalId}")
            except:
                print(f"{lc.name} does not have any terminal paths \n")
    except:
        print(f"{t.terminalName} does not have any valid configurations \n")

# Categories properties
categories = d.categories
for cat in categories:
    print("*** - Categories properties - ***")
    print(f"Category creation time: {cat.creationTime}")
    print(f"Category Name: {cat.name} \n")

在本主题中