サマリー
The Describe function returns the following properties for a trace network.
A trace network returns a dataType of "TraceNetwork".
プロパティ
プロパティ | 説明 | データ タイプ |
associationSource (読み取り専用) | The associationSource object. This object can be used to retrieve properties of the association sources. | Object |
createDirtyAreaForAnyAttributeUpdate (読み取り専用) | Whether dirty areas are created for any attribute update when the network topology is enabled.
| Boolean |
creationTime (読み取り専用) | The creation date and time of the trace network. | DateTime |
globalID (読み取り専用) | The Global ID of the trace network. | String |
minimalDirtyAreaSize (読み取り専用) | The minimum size of the dirty areas in the network topology. | Integer |
networkAttributes (読み取り専用) | The networkAttributes object. This object can be used to retrieve properties of the network attributes. | Object |
proVersion (読み取り専用) | The version of ArcGIS Pro used to build the trace network. | String |
schemaGeneration (読み取り専用) | The schema generation value of the input trace network. | Integer |
sources (読み取り専用) | The sources object. This object can be used to retrieve properties of the trace network sources. | Object |
systemJunctionSource (読み取り専用) | The systemJunctionSource object. This object can be used to retrieve properties of the system junction sources. | Object |
コードのサンプル
This stand-alone PythonPython script prints a report of some trace network properties.
'''****************************************************************************
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))