import UNTraceConfiguration from "@arcgis/core/networks/support/UNTraceConfiguration.js";const UNTraceConfiguration = await $arcgis.import("@arcgis/core/networks/support/UNTraceConfiguration.js");- Inheritance:
- UNTraceConfiguration→
TraceConfiguration→ Accessor
- Since
- ArcGIS Maps SDK for JavaScript 4.23
The UNTraceConfiguration class contains properties required to define objects than can be used to run custom traces on utility networks. A UNTraceConfiguration differs from a TraceConfiguration slightly because a UNTraceConfiguration contains parameters that are only applicable or relevant to utility networks.
Example
// create a new instance of UNTraceConfiguration// and configure some parametersconst unTraceConfiguration = new UNTraceConfiguration({ domainNetworkName: "Electric", tierName: "Electric Distribution", subnetworkName: "RMT003", includeContainers: true, validateConsistency: true, // Traversability conditionBarriers: [ { name: "E:Device Status", type: "networkAttribute", operator: "equal", value: 1, combineUsingOr: false, isSpecificValue: true } ], traversabilityScope: "junctionsAndEdges",});Constructors
Constructor
Parameters
| Parameter | Type | Description | Required |
|---|---|---|---|
| properties | | |
Properties
| Property | Type | Class |
|---|---|---|
| | ||
| | ||
| | ||
conditionBarriers inherited | ||
declaredClass readonly inherited | ||
| | ||
| | ||
| | ||
| | ||
| | ||
| | ||
functionBarriers inherited | ||
functions inherited | ||
ignoreBarriersAtStartingPoints inherited | ||
includeBarriers inherited | ||
| | ||
| | ||
| | ||
| | ||
| | ||
| | ||
| | ||
| | ||
| | ||
outputConditions inherited | ||
Object[] | | |
| | ||
| | ||
shortestPathNetworkAttributeName inherited | ||
| | ||
| | ||
| | ||
traversabilityScope inherited | ||
validateConsistency inherited | ||
| |
circuitName
- Since
- ArcGIS Maps SDK for JavaScript 4.34
Specifies the name of the circuit that will be traced.
When a value is provided for this option, the starting location for the circuit is used as the starting point for the trace, and traceLocations is not required.
This option is only honored for circuit traces.
conditionBarriers
- Type
- BarrierJSON[]
An array of objects representing network attribute or category conditions that serve as barriers.
filterBarriers
- Type
- BarrierJSON[]
An array of objects representing specific categories or network attributes where the trace will stop.
filterFunctionBarriers
- Type
- FunctionBarrierJSON[]
An array of objects representing filter function barriers.
functionBarriers
- Type
- FunctionBarrierJSON[]
An array of objects representing function barriers. Function barriers define when a trace should stop when an aggregated function condition is satisfied. For example, stop the trace when the sum of the shape length network attribute exceeds 100 meters.
functions
- Type
- FunctionJSON[]
An array of objects representing function. A function allows the ability to run calculations on network attributes associated with traced network features. Multiple functions can be specified for a single trace.
ignoreBarriersAtStartingPoints
Do not stop the trace if the starting point is a barrier.
includeBarriers
Specifies whether the traversability barrier features will be included in the trace results.
maxHops
- Since
- ArcGIS Maps SDK for JavaScript 4.34
Specifies the maximum number of hops between edges allowed in the valid path, excluding the starting point. All edges and junction-junction connectivity associations are evaluated as having a fixed unit length of 1 on traversal. Terminal devices are evaluated as having a fixed unit length of 2.
This option is only honored for path or circuit traces.
nearestNeighbor
- Type
- NearestNeighborJSON | null | undefined
Specifies the parameters needed for calculating nearest neighbors. Nearest neighbor is used to return a number of features of a certain type within a given distance.
outputConditions
- Type
- OutputConditionJSON[]
Specifies the type of features returned based on a network attribute or check for a category string. A condition barrier uses a network attribute, an operator, a type, and an attribute value.
- See also
outputFilters
- Type
- AssetJSON[]
An array of objects used to control what is returned in the results of a trace.
propagators
- Type
- PropagatorJSON[]
A propagator defines the propagation of a network attribute along a traversal and provides a filter to stop traversal. Propagators are only applicable to subnetwork-based traces (subnetwork, subnetworksource, upstream, or downstream).
shortestPathNetworkAttributeName
Specifies the network attribute name used for determining the shortest path. The shortest path is calculated using a numeric network attribute such as shape length.
subnetworkName
Specifies the name of the subnetwork where the trace will be run.
traversabilityScope
Determines whether traversability is applied to both junctions and edges, junctions only, or edges only. For example, if we set the traversabilityScope to be junctions only, edges will not get evaluated
against traversability conditions and filters.
| Value | Description |
|---|---|
| junctions | Traversability will be applied to junctions only. |
| edges | Traversability will be applied to edges only. |
| junctionsAndEdges | Traversability will be applied to both junctions and edges. |
validateConsistency
Specifies whether an error will be returned if dirty areas are encountered in any of the traversed features. If set to false the trace will succeed even when dirty areas were encountered. However, the
trace results might not be consistent.
Methods
fromJSON
- Signature
-
fromJSON (json: any): any
Creates a new instance of this class and initializes it with values from a JSON object
generated from an ArcGIS product. The object passed into the input json
parameter often comes from a response to a query operation in the REST API or a
toJSON()
method from another ArcGIS product. See the Using fromJSON()
topic in the Guide for details and examples of when and how to use this function.
Parameters
| Parameter | Type | Description | Required |
|---|---|---|---|
| json | A JSON representation of the instance in the ArcGIS format. See the ArcGIS REST API documentation for examples of the structure of various input JSON objects. | |
- Returns
- any
Returns a new instance of this class.
clone
- Signature
-
clone (): this
Creates a deep clone of this object. Any properties that store values by reference will be assigned copies of the referenced values on the cloned instance.
- Returns
- this
A deep clone of the class instance that invoked this method.
toJSON
- Signature
-
toJSON (): any
Converts an instance of this class to its ArcGIS portal JSON representation. See the Using fromJSON() guide topic for more information.
- Returns
- any
The ArcGIS portal JSON representation of an instance of this class.