Discover connected features in a utility network using connected, subnetwork, upstream, and downstream traces.
You can use a trace to visualize and validate the network topology of a utility network for quality assurance. Subnetwork traces are used for validating whether subnetworks, such as circuits or zones, are defined or edited appropriately.
Tap on one or more features while 'Add starting locations' or 'Add barriers' is selected. When a junction feature is identified, you may be prompted to select a terminal. When an edge feature is identified, the distance from the tapped location to the beginning of the edge feature will be computed. Select the type of trace using the drop down menu. Tap 'Trace' to initiate a trace on the network. Tap 'Reset' to clear the trace parameters and start over.
- Create a
MapView
and subscribe to itsGeoViewTapped
event. - Create and load a
ServiceGeodatabase
with a feature service URL and get tables by their layer IDs. - Create a
Map
that containsFeatureLayer
(s) created from theServiceGeodatabase
's tables. - Create and load a
UtilityNetwork
with the same feature service URL and thisMap
. - Add a
GraphicsOverlay
with symbology that distinguishes starting locations from barriers. - Identify features on the map and add a
Graphic
that represents its purpose (starting location or barrier) at the tapped location. - Create a
UtilityElement
for the identified feature. - Determine the type of this element using its
UtilityNetworkSource.SourceType
property. - If the element is a junction with more than one terminal, display a terminal picker. Then set the junction's
UtilityTerminal
property with the selected terminal. - If an edge, set its
FractionAlongEdge
property usingGeometryEngine.FractionAlong
. - Add this
UtilityElement
to a collection of starting locations or barriers. - Create
UtilityTraceParameters
with the selected trace type along with the collected starting locations and barriers (if applicable). - Set the
UtilityTraceParameters.TraceConfiguration
with the tier'sUtilityTier.GetDefaultTraceConfiguration()
result. - Run a
UtilityNetwork.TraceAsync
with the specified parameters. - For every
FeatureLayer
in the map, select the features returned withGetFeaturesForElementsAsync
from the elements matching theirUtilityNetworkSource.FeatureTable
with the layer'sFeatureTable
.
- FractionAlong
- ServiceGeodatabase
- UtilityAssetType
- UtilityDomainNetwork
- UtilityElement
- UtilityElementTraceResult
- UtilityNetwork
- UtilityNetworkDefinition
- UtilityNetworkSource
- UtilityTerminal
- UtilityTier
- UtilityTraceConfiguration
- UtilityTraceParameters
- UtilityTraceResult
- UtilityTraceType
- UtilityTraversability
The Naperville electrical network feature service contains a utility network used to run the subnetwork-based trace shown in this sample. Authentication is required and handled within the sample code.
Using utility network on ArcGIS Enterprise 10.8 requires an ArcGIS Enterprise member account licensed with the Utility Network user type extension. Please refer to the utility network services documentation.
A UtilityNetworkTraceTool
component can be used for various utility network related use cases. For information about setting up the toolkit, as well as code for the component, visit the toolkit repository.
condition barriers, downstream trace, network analysis, subnetwork trace, toolkit, trace configuration, traversability, upstream trace, utility network, validate consistency