Module com.esri.arcgisruntime
Class UtilityTraceFilter
java.lang.Object
com.esri.arcgisruntime.utilitynetworks.UtilityTraceFilter
A mechanism that can be used to stop tracing when returning results.
UtilityTraceFilter
objects do not stop
traversability to the controller.
Consider an upstream protective device trace. At first, you might try defining a UtilityCategoryComparison
that looks for a Protective Device category and assigning this to UtilityTraversability.getBarriers()
. When
you try to run an upstream trace using this configuration, it will probably fail. This is because traversability will
stop at the first protective device, and the trace will be unable to find the subnetwork controller. The correct way
to implement this trace is to assign UtilityCategoryComparison
to the filter.
UtilityTraceFilter
is set in the UtilityTraceConfiguration
.
- Since:
- 100.8.0
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionGets a condition object specifying when to traverse a node or its subnodes.Gets a UtilityNetworkAttribute that stores a bitset, and this bitset should be used to filter results.Gets a mutable list of utility trace function barriers.Gets a filter object specifying the next N features to be returned from the starting point.getScope()
Gets a UtilityTraversabilityScope value that determines whether traversability criteria are evaluated on edges, junctions, or both.void
setBarriers
(UtilityTraceCondition utilityTraceCondition) Sets a condition object specifying when to traverse a node or its subnodes.void
setBitsetNetworkAttribute
(UtilityNetworkAttribute utilityNetworkAttribute) Sets a UtilityNetworkAttribute that stores a bitset, and this bitset should be used to filter results.void
setNearestNeighbor
(UtilityNearestNeighbor nearestNeighbor) Sets a filter object specifying the next N features to be returned from the starting point.void
Sets a value that determines whether traversability criteria are evaluated on edges, junctions, or both.
-
Constructor Details
-
UtilityTraceFilter
public UtilityTraceFilter()Creates a new instance of UtilityTraceFilter.- Since:
- 100.8.0
-
-
Method Details
-
getBarriers
Gets a condition object specifying when to traverse a node or its subnodes.- Returns:
- a condition object specifying when to traverse a node or its subnodes, or null if none has been set
- Since:
- 100.8.0
-
setBarriers
Sets a condition object specifying when to traverse a node or its subnodes.- Parameters:
utilityTraceCondition
- a condition object specifying when to traverse a node or its subnodes- Since:
- 100.8.0
-
getBitsetNetworkAttribute
Gets a UtilityNetworkAttribute that stores a bitset, and this bitset should be used to filter results.- Returns:
- a UtilityNetworkAttribute that stores a bitset, or null if none has been set
- Since:
- 100.8.0
-
setBitsetNetworkAttribute
Sets a UtilityNetworkAttribute that stores a bitset, and this bitset should be used to filter results.- Parameters:
utilityNetworkAttribute
- UtilityNetworkAttribute that stores a bitset which should be used to filter- Since:
- 100.8.0
-
getFunctionBarriers
Gets a mutable list of utility trace function barriers. AddUtilityTraceFunctionBarrier
to it to specify barriers. If any of these objects evaluates to true, further traversal is terminated.- Returns:
- a mutable list of UtilityTraceFunctionBarrier that specify the function barriers. Initially it is empty.
- Since:
- 100.8.0
-
getNearestNeighbor
Gets a filter object specifying the next N features to be returned from the starting point.- Returns:
- a UtilityNearestNeighbor object specifying the next N features to be returned from the starting point, or null if none has been set
- Since:
- 100.8.0
-
setNearestNeighbor
Sets a filter object specifying the next N features to be returned from the starting point.- Parameters:
nearestNeighbor
- a UtilityNearestNeighbor object specifying the next N features to be returned from the starting point- Since:
- 100.8.0
-
getScope
Gets a UtilityTraversabilityScope value that determines whether traversability criteria are evaluated on edges, junctions, or both.Note: The default value is
UtilityTraversabilityScope.JUNCTIONS_AND_EDGES
.- Returns:
- a UtilityTraversabilityScope value that determines whether traversability criteria are evaluated on edges, junctions, or both
- Since:
- 100.8.0
-
setScope
Sets a value that determines whether traversability criteria are evaluated on edges, junctions, or both.- Parameters:
scope
- a UtilityTraversabilityScope value- Throws:
IllegalArgumentException
- if scope is null- Since:
- 100.8.0
-