层属性

摘要

下面是在公共设施网络中使用 Describe 时由 tiers 对象返回的属性。

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

属性

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

aggregatedLinesForSubnetLine 对象可用于检索 SubnetLine 类的聚合线的属性。

Object
creationTime
(只读)

层的创建时间。

String
diagramTemplates
(只读)

层所使用的逻辑示意图模板的列表。

String
name
(只读)

层的名称。

String
rank
(只读)

层等级的值。

Integer
subnetworkFieldName
(只读)

子网字段名称。

String
supportDisjointSubnetwork
(只读)

返回层是否支持不相交子网。

  • True - 层支持不相交子网。
  • False - 层不支持不相交子网。

Boolean
tierGroupName
(只读)

如果网络具有等级层定义,则这是层所属的层组的名称。

String
tierID
(只读)

层的 ID。

Integer
tierTopology
(只读)

层拓扑类型,例如,径向或网格层拓扑。

String
updateSubnetworkEditModeForDefaultVersion
(只读)

默认版本上子网更新的编辑模式。

String
updateSubnetworkEditModeForNamedVersion
(只读)

指定版本上子网更新的编辑模式。

String
updateSubnetworkOnContainers
(只读)

返回更新子网进程是否将更新域网络容器的受支持子网名称

  • True - 域网络容器将被更新。
  • False - 域网络容器不会被更新。

Boolean
updateSubnetworkOnStructures
(只读)

返回更新子网进程是否将更新结构网络容器的受支持子网名称属性。

  • True - 结构网络容器将被更新。
  • False - 结构网络容器不会被更新。

Boolean
updateSubnetworkTraceConfiguration
(只读)

updateSubnetworkTraceConfiguration 对象可用于在更新子网络时检索追踪配置的属性。

Object
validDevices
(只读)

validDevices 对象可用于检索有效设备的属性。

Object
validEdgeObjects
(只读)

validEdgeObjects 对象可用于检索有效边对象的属性。

Object
validJunctions
(只读)

validJunctions 对象可用于检索有效交汇点的属性。

Object
validJunctionObjects
(只读)

validJunctionObjects 对象可用于检索有效交汇点对象的属性。

Object
validJunctionObjectSubnetworkControllers
(只读)

可用于检索有效交汇点对象子网控制器的属性的 validJunctionObjectSubnetworkControllers 对象。

Object
validLines
(只读)

validLines 对象可用于检索有效线的属性。

Object
validSubnetworkControllers
(只读)

validSubnetworkControllers 对象可用于检索有效子网控制器的属性。

Object

代码示例

层属性示例(独立脚本)

此独立 Python 脚本是由 tiers 对象返回的属性报表。

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

# Import required modules
import arcpy

# Describe functions on a Utility Network
UN = "C:\\Projects\\MyProject\\unowner.sde\\Naperville.UNOWNER.Naperville\\Naperville.UNOWNER.Naperville" 
d = arcpy.Describe(UN)

# Domain Network properties
domnets = d.domainNetworks
for dom in domnets:
    print("*** - Domain Network properties - ***")
    print(f"Domain Network Creation Time: {dom.creationTime}")
    print(f"Domain Network Release Number: {dom.releaseNumber}")
    print(f"Domain Network Name: {dom.domainNetworkName}")
    print(f"Domain Network ID: {dom.domainNetworkId}")
    print(f"Domain Network Alias Name: {dom.domainNetworkAliasName}")
    print(f"Domain Network is Structure Network: {dom.isStructureNetwork}")
    print(f"Domain Network Tier Definition: {dom.tierDefinition}")
    print(f"Domain Network Subnetwork Controller Type: {dom.subnetworkControllerType} \n")
    print(f"Domain Network Subnetwork Table Name: {dom.subnetworkTableName}")
    print(f"Domain Network Subnetwork Label Field Name: {dom.subnetworkLabelFieldName}")    
    
    for tier in dom.tiers:
        print(f"Tier Name: {tier.name}")
        print(f"Rank: {tier.rank}")
        print(f"Tier topology type: {tier.tierTopology}")
        print(f"Tier group name: {tier.tierGroupName} \n")
        print(f"Subnetwork field name: {tier.subnetworkFieldName}")
        print(f"Supports disjoint subnetwork: {tier.supportDisjointSubnetwork}")
        print(f"Update Subnetwork Edit Mode For Default Version: {tier.updateSubnetworkEditModeForDefaultVersion}")
        print(f"Update Subnetwork Edit Mode For Named Version: {tier.updateSubnetworkEditModeForNamedVersion}")
        print(f"Update Subnetwork On Structures: {tier.updateSubnetworkOnStructures}")
        print(f"Update Subnetwork On Containers: {tier.updateSubnetworkOnContainers}")
        print(f"Diagram templates: {tier.diagramTemplates} \n")

        # Subnetwork Controller Properties
        for sc in tier.validSubnetworkControllers:
            print(" -- Subnetwork Controllers Properties -- ")
            print(f"Asset Group Code: {sc.assetGroupCode} \n")
            print(" - Asset Type Properties - ")
            for at in sc.assetTypes:
                print(f"Asset Type Code: {at.assetTypeCode} \n")

        # Valid Device Properties        
        for vd in tier.validDevices:
            print(" -- Valid Devices Properties -- ")
            print(f"Asset Group Code: {vd.assetGroupCode} \n")
            print(" - Asset Type Properties - ")
            for at in vd.assetTypes:
                print(f"Asset Type Code: {at.assetTypeCode} \n")

        # Valid Lines Properties        
        for vl in tier.validLines:
            print(" -- Valid Lines Properties -- ")
            print(f"Asset Group Code: {vl.assetGroupCode} \n")
            print(" - Asset Type Properties - ")
            for at in vl.assetTypes:
                print(f"Asset Type Code: {at.assetTypeCode}")

        # Valid Junctions Properties        
        for vj in tier.validJunctions:
            print(" -- Valid Junctions Properties -- ")
            print(f"Asset Group Code: {vj.assetGroupCode} \n")
            print(" - Asset Type Properties - ")
            for at in vj.assetTypes:
                print(f"Asset Type Code: {at.assetTypeCode}")		
				
        # Valid Junction Objects Properties        
        for vjo in tier.validJunctionObjects:
            print(" -- Valid JunctionObjects Properties -- ")
            print(f"Asset Group Code: {vjo.assetGroupCode} \n")
            print(" - Asset Type Properties - ")
            for at in vjo.assetTypes:
                print(f"Asset Type Code: {at.assetTypeCode}")
                
        # Valid Junction Objects Subnetwork Controller Properties
        for vjosc in tier.validJunctionObjectSubnetworkControllers:
            print(" -- Valid Junction Object Subnetwork Controllers Properties -- ")
            print(f"Asset Group Code: {vjosc.assetGroupCode} \n")
            print(" - Asset Type Properties - ")
            for at in vjosc.assetTypes:
                print(f"Asset Type Code: {at.assetTypeCode} \n")                

        # Valid Edge Objects Properties        
        for veo in tier.validEdgeObjects:
            print(" -- Valid EdgeObjects Properties -- ")
            print(f"Asset Group Code: {veo.assetGroupCode} \n")
            print(" - Asset Type Properties - ")
            for at in veo.assetTypes:
                print(f"Asset Type Code: {at.assetTypeCode}")		
                
        # Aggregated Lines for SubnetLine Properties        
        for al in tier.aggregatedLinesForSubnetLine:
            print(" -- Aggregated Lines for SubnetLine Properties -- ")
            print(f"Asset Group Code: {al.assetGroupCode} \n")
            print(" - Asset Type Properties - ")
            for at in al.assetTypes:
                print(f"Asset Type Code: {at.assetTypeCode} \n")	
                
        # Update Subnetwork Trace Configuration Properties
        print(" -- Update Subnetwork Trace Properties -- ")        
        ust = tier.updateSubnetworkTraceConfiguration
        print(f"Include Containers: {ust.includeContainers}")
        print(f"Include Content: {ust.includeContent}")
        print(f"Include Structures: {ust.includeStructures}")
        print(f"Include Barriers: {ust.includeBarriers}")
        print(f"Validate Consistency: {ust.validateConsistency}")
        print(f"Validate Locatability: {ust.validateLocatability}")
        print(f"Include Isolated: {ust.includeIsolated}")
        print(f"Ignore Barriers at Starting Points: {ust.ignoreBarriersAtStartingPoints}")
        print(f"Include Up To First Spatial Container: {ust.includeUpToFirstSpatialContainer}")
        print(f"Allow Indeterminate Flow: {ust.allowIndeterminateFlow}")
        print(f"Domain Network Name: {ust.domainNetworkName}")
        print(f"Tier Name: {ust.tierName}")
        print(f"Target Tier Name: {ust.targetTierName}")
        print(f"Subnetwork Name: {ust.subnetworkName}")
        print(f"Diagram Template Name: {ust.diagramTemplateName}")
        print(f"Shortest Path Network Attribute Name: {ust.shortestPathNetworkAttributeName}")
        print(f"Filter Bitset Network Attribute Name: {ust.filterBitsetNetworkAttributeName}")
        print(f"Traversability Scope: {ust.traversabilityScope}")
        print(f"Filter Scope: {ust.filterScope} \n")

        # Condition Barrier Properties
        print(" - Condition Barrier Properties - ")
        for cb in ust.conditionBarriers:
            try:
                print(f"Name: {cb.name} ")
                print(f"Type: {cb.type} ")
                print(f"Operator: {cb.operator} ")
                print(f"Value: {cb.value} ")
                print(f"CombineUsingOr: {cb.combineUsingOr}")
                print(f"Is Specific Value: {cb.isSpecificValue} \n")
            except:
                print("Skipped condition barrier properties. \n")
        
        # Function Barrier Properties
        print(" - Function Barrier Properties - ")
        for fb in ust.functionBarriers:
            try:
                print(f"Name: {fb.networkAttributeName}")
                print(f"Type: {fb.functionType}")
                print(f"Operator: {fb.networkAttributeOperator}")
                print(f"Value: {fb.value} ")
                print(f"Use Local Values: {fb.useLocalValues} \n")
            except:
                print("Skipped function barrier properties. \n")
            
        # Filter Barrier Properties
        print(" - Filter Barrier Properties - ")
        for filb in ust.filterBarriers:
            try:
                print(f"Name: {filb.name}")
                print(f"Type: {filb.type}")
                print(f"Operator: {filb.operator}")
                print(f"Value: {filb.value}")
                print(f"CombineUsingOr: {filb.combineUsingOr}")
                print(f"Is Specific Value: {filb.isSpecificValue} \n")
            except:
                print("Skipped filter barrier properties. \n")
        
        # Filter Function Barrier Properties
        print(" - Filter Function Barrier Properties - ")
        for ffb in ust.filterFunctionBarriers:
            try:
                print(f"Name: {ffb.networkAttributeName}")
                print(f"Type: {ffb.functionType}")
                print(f"Operator: {ffb.networkAttributeOperator}")
                print(f"Value: {ffb.value}")
                print(f"Use Local Values: {ffb.useLocalValues} \n")
            except:
                print("Skipped filter function properties. \n")

        # Functions Properties
        print(" - Functions Properties - ")
        for f in ust.functions:
            # Try to get these properties if the exist, else, print the empty list
            try:
                print(f"Function Type: {f.functionType}")
                print(f"Function Network Attribute Name: {f.networkAttributeName}")
                print(f"Function Summary Attribute Name: {f.summaryAttributeName} \n")
                # Function Conditions
                print(" - Function Conditions - ")
                for fc in f.conditions:
                    print(f"Name: {fc.name}")
                    print(f"Type: {fc.type}")
                    print(f"Operator: {fc.operator}")
                    print(f"Value: {fc.value}")
                    print(f"CombineUsingOr: {fc.combineUsingOr}")
                    print(f"Is Specific Value: {fc.isSpecificValue} \n")
            except:
                print("Skipped functions properties. \n")

        # Nearest Neighbor Properties
        print(" - Nearest Neighbor Properties - ")
        nn = ust.nearestNeighbor
        # Try to get these properties if the exist, else, print the empty list
        try:
            print(f"Count: {nn.count}")
            print(f"Cost Network Attribute Name: {nn.costNetworkAttributeName}")
            print(f"Nearest Categories: {nn.nearestCategories} \n")
            print(f" - Nearest Asset Properties - ")
            for nsta in nn.nearestAssets:
                try:
                    print(f"Network Source ID: {nsta.networkSourceID}")
                    print(f"Asset Group Code: {nsta.assetGroupCode}")
                    print(f"Asset Type Code: {nsta.assetTypeCode} \n")
                except:
                    print("Skipped nearest assets properties. \n")
        except:
            print("Skipped nearest neighbor properties. \n")
            
        # Output Filter Properties
        print(" - Output Filter Properties - ")
        for ofp in ust.outputFilters:
            # Try to get these properties if the exist, else, print the empty list
            try:
                for of in ofp:
                    print(f"Network Source ID: {of.networkSourceID}")
                    print(f"Asset Group Code: {of.assetGroupCode}")
                    print(f"Asset Type Code: {of.assetTypeCode} \n")
            except:
                print("Skipped output filter properties. \n")

        # Output Condition Properties
        print(" - Output Condition Properties - ")
        for oc in ust.outputConditions:
            # Try to get these properties if the exist, else, print the empty list
            try:
                print(f"Name: {oc.name}")
                print(f"Type: {oc.type}")
                print(f"Operator: {oc.operator}")
                print(f"Value: {oc.value}")
                print(f"CombineUsingOr: {oc.combineUsingOr}")
                print(f"Is Specific Value: {oc.isSpecificValue} \n")
            except:
                print("Skipped output condition properties. \n")
            
        # Propagators Properties
        print(" - Propagator Properties - ")
        for p in ust.propagators:
            # Try to get these properties if the exist, else, print the empty list
            try:
                print(f"Network Attribute Name: {p.networkAttributeName}")
                print(f"Trace Propagator Function Type: {p.tracePropagatorFunctionType}")
                print(f"Network Attribute Filter Operator: {p.networkAttributeOperator}")
                print(f"Network Attribute Value: {p.value}")
                print(f"Propagated Attribute Name: {p.propagatedAttributeName}")
                print(f"Substitution Attribute Name: {p.substitutionAttributeName}")
            except:
                print("Skipped propagator properties. \n")

在本主题中