层属性

摘要

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

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

属性

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

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

Object
creationTime
(只读)

层的创建时间。

String
diagramTemplates
(只读)

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

String
manageSubnetwork
(只读)

此 manageSubnetwork 对象可用于检索子网状态的属性。

Object
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("Domain Network Creation Time: {0}".format(dom.creationTime))
    print("Domain Network Release Number: {0}".format(dom.releaseNumber))
    print("Domain Network Name: {0}".format(dom.domainNetworkName))
    print("Domain Network ID: {0}".format(dom.domainNetworkId))
    print("Domain Network Alias Name: {0}".format(dom.domainNetworkAliasName))
    print("Domain Network is Structure Network: {0}".format(dom.isStructureNetwork))
    print("Domain Network Tier Definition: {0}".format(dom.tierDefinition))
    print("Domain Network Subnetwork Controller Type: {0} \n".format(dom.subnetworkControllerType))
    print("Domain Network Subnetwork Table Name: {0}".format(dom.subnetworkTableName))
    print("Domain Network Subnetwork Label Field Name: {0}".format(dom.subnetworkLabelFieldName))    
    
    for tier in dom.tiers:
        print("Tier Name: {0}".format(tier.name))
        print("Rank: {0}".format(tier.rank))
        print("Tier topology type: {0}".format(tier.tierTopology))
        print("Tier group name: {0} \n".format(tier.tierGroupName))
        print("Subnetwork field name: {0}".format(tier.subneworkFieldName))
        print("Supports disjoint subnetwork: {0}".format(tier.supportDisjointSubnetwork))
        print("Diagram templates: {0} \n".format(tier.diagramTemplates))

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

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

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

        # Aggregated Lines for SubnetLine Properties        
        for al in tier.aggregatedLinesForSubnetLine:
            print(" -- Aggregated Lines for SubnetLine Properties -- ")
            print("Asset Group Code: {0} \n".format(al.assetGroupCode))
            print(" - Asset Type Properties - ")
            for at in al.assetTypes:
                print("Asset Type Code: {0} \n".format(at.assetTypeCode))

        # Update Subnetwork Trace Configuration Properties
        print(" -- Update Subnetwork Trace Properties -- ")        
        ust = tier.updateSubnetworkTraceConfiguration
        print("Include Containers: {0}".format(ust.includeContainers))
        print("Include Content: {0}".format(ust.includeContent))
        print("Include Structures: {0}".format(ust.includeStructures))
        print("Include Barriers: {0}".format(ust.includeBarriers))
        print("Validate Consistency: {0}".format(ust.validateConsistency))
        print("Domain Network Name: {0}".format(ust.domainNetworkName))
        print("Tier Name: {0}".format(ust.tierName))
        print("Target Tier Name: {0}".format(ust.targetTierName))
        print("Subnetwork Name: {0}".format(ust.subnetworkName))
        print("Diagram Template Name: {0}".format(ust.diagramTemplateName))
        print("Shortest Path Network Attribute Name: {0}".format(ust.shortestPathNetworkAttributeName))
        print("Filter Bitset Network Attribute Name: {0}".format(ust.filterBitsetNetworkAttributeName))
        print("Traversability Scope: {0}".format(ust.traversabilityScope))
        print("Filter Scope: {0} \n".format(ust.filterScope))

        # Condition Barrier Properties
        print(" - Condition Barrier Properties - ")
        for cb in ust.conditionBarriers:
            try:
                print("Name: {0} ".format(cb.name))
                print("Type: {0} ".format(cb.type))
                print("Operator: {0} ".format(cb.operator))
                print("Value: {0} ".format(cb.value))
                print("CombineUsingOr: {0}".format(cb.combineUsingOr))
                print("Is Specific Value: {0} \n".format(cb.isSpecificValue))
            except:
                print("Skipped condition barrier properties. \n")
        
        # Function Barrier Properties
        print(" - Function Barrier Properties - ")
        for fb in ust.functionBarriers:
            try:
                print("Name: {0} ".format(fb.networkAttributeName))
                print("Type: {0} ".format(fb.functionType))
                print("Operator: {0} ".format(fb.networkAttributeOperator))
                print("Value: {0} ".format(fb.value))
                print("Use Local Values: {0} \n".format(fb.useLocalValues))
            except:
                print("Skipped function barrier properties. \n")
            
        # Filter Barrier Properties
        print(" - Filter Barrier Properties - ")
        for filb in ust.filterBarriers:
            try:
                print("Name: {0} ".format(filb.name))
                print("Type: {0} ".format(filb.type))
                print("Operator: {0} ".format(filb.operator))
                print("Value: {0} ".format(filb.value))
                print("CombineUsingOr: {0}".format(filb.combineUsingOr))
                print("Is Specific Value: {0} \n".format(filb.isSpecificValue))
            except:
                print("Skipped filter barrier properties. \n")
        
        # Filter Function Barrier Properties
        print(" - Filter Function Barrier Properties - ")
        for ffb in ust.filterFunctionBarriers:
            try:
                print("Name: {0} ".format(ffb.networkAttributeName))
                print("Type: {0} ".format(ffb.functionType))
                print("Operator: {0} ".format(ffb.networkAttributeOperator))
                print("Value: {0} ".format(ffb.value))
                print("Use Local Values: {0} \n".format(ffb.useLocalValues))
            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("Function Type: {0} ".format(f.functionType))
                print("Function Network Attribute Name: {0} ".format(f.networkAttributeName))
                print("Function Summary Attribute Name: {0} \n".format(f.summaryAttributeName))
                # Function Conditions
                print(" - Function Conditions - ")
                for fc in f.conditions:
                    print("Name: {0} ".format(fc.name))
                    print("Type: {0} ".format(fc.type))
                    print("Operator: {0} ".format(fc.operator))
                    print("Value: {0} ".format(fc.value))
                    print("CombineUsingOr: {0}".format(fc.combineUsingOr))
                    print("Is Specific Value: {0} \n".format(fc.isSpecificValue))
            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("Count: {0} ".format(nn.count))
            print("Cost Network Attribute Name: {0} ".format(nn.costNetworkAttributeName))
            print("Nearest Categories: {0} \n".format(nn.nearestCategories))
            print(" - Nearest Asset Properties - ")
            for nsta in nn.nearestAssets:
                try:
                    print("Network Source ID: {0}".format(nsta.networkSourceID))
                    print("Asset Group Code: {0}".format(nsta.assetGroupCode))
                    print("Asset Type Code: {0} \n".format(nsta.assetTypeCode))
                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("Network Source ID: {0}".format(of.networkSourceID))
                    print("Asset Group Code: {0}".format(of.assetGroupCode))
                    print("Asset Type Code: {0} \n".format(of.assetTypeCode))
            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("Name: {0} ".format(oc.name))
                print("Type: {0} ".format(oc.type))
                print("Operator: {0} ".format(oc.operator))
                print("Value: {0} ".format(oc.value))
                print("CombineUsingOr: {0}".format(oc.combineUsingOr))
                print("Is Specific Value: {0} \n".format(oc.isSpecificValue))
            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("Network Attribute Name: {0} ".format(p.networkAttributeName))
                print("Trace Propagator Function Type: {0} ".format(p.tracePropagatorFunctionType))
                print("Network Attribute Filter Operator: {0} ".format(p.networkAttributeOperator))
                print("Network Attribute Value: {0} ".format(p.value))
                print("Propagated Attribute Name: {0} ".format(p.propagatedAttributeName))
                print("Substitution Attribute Name: {0} ".format(p.substitutionAttributeName))
            except:
                print("Skipped propagator properties. \n")

在本主题中