Utility Network properties

Zusammenfassung

The Describe function returns the following properties for a utility network.

A utility network returns a dataType of "UtilityNetwork".

Learn more about the utility network

Eigenschaften

EigenschaftErläuterungDatentyp
associationSource
(Schreibgeschützt)

The associationSource object. This object can be used to retrieve properties of the association sources.

Object
categories
(Schreibgeschützt)

The categories object. This object can be used to retrieve properties of the utility network categories.

Object
createDirtyAreaForAnyAttributeUpdate
(Schreibgeschützt)

Whether dirty areas are created for any attribute update when the network topology is enabled.

  • True—Dirty areas are created for any attribute update.
  • False—Dirty areas are not created for any attribute update.

Boolean
creationTime
(Schreibgeschützt)

The creation date and time of the utility network.

DateTime
domainNetworks
(Schreibgeschützt)

The domainNetworks object. This object can be used to retrieve properties of the domain networks.

Object
globalID
(Schreibgeschützt)

The Global ID of the utility network.

String
minimalDirtyAreaSize
(Schreibgeschützt)

The minimum size of the dirty areas in the network topology.

Integer
networkAttributes
(Schreibgeschützt)

The networkAttributes object. This object can be used to retrieve properties of the network attributes.

Object
proVersion
(Schreibgeschützt)

The version of ArcGIS Pro used to build the utility network.

String
schemaGeneration
(Schreibgeschützt)

The schema generation value of the input utility network.

Integer
serviceTerritoryFeatureClassName
(Schreibgeschützt)

The name of the polygon feature class used to set the extent for the utility network.

String
systemJunctionObjectSource
(Schreibgeschützt)

The systemJunctionObjectSource object. This object can be used to retrieve properties of the system junction object sources.

Object
systemJunctionSource
(Schreibgeschützt)

The systemJunctionSource object. This object can be used to retrieve properties of the system junction sources.

Object
terminalConfigurations
(Schreibgeschützt)

The terminalConfigurations object. This object can be used to retrieve properties of the terminal configurations.

Object

Codebeispiel

Utility network properties example (stand-alone script)

This stand-alone Python script prints a report of some utility network properties.

'''****************************************************************************
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")