Package oracle.spatial.network.lod
Class NetworkAnalyst
- java.lang.Object
-
- oracle.spatial.network.lod.NetworkAnalyst
-
public class NetworkAnalyst extends java.lang.Object
This class is the single entry point to all the network analysis operations supported by NDM LOD. To get an instance of this class, useNetworkAnalyst analyst = LODNetworkManager.getNetworkAnalyst(networkIO);
where networkIO is an NetworkIO object for the network of interest.Users can define their own link cost calculators or node cost calculators. Note that if you choose to use your own link or node cost calculators, you must set both link and node cost calculators in pairs, that is, there must be the same number of link cost calculators as that of the node cost calculators, and the ith link cost calculator must correspond to the ith node cost calculator.
- Since:
- 11gR1
-
-
Field Summary
Fields Modifier and Type Field Description static int
ACCURACY_LEVEL_HIGH
static int
ACCURACY_LEVEL_HIGHEST
static int
ACCURACY_LEVEL_LOW
static int
ACCURACY_LEVEL_LOWEST
static int
ACCURACY_LEVEL_MEDIUM
static int
BREADTH_FIRST_SEARCH
Constant for bread-first-searchstatic int
DEPTH_FIRST_SEARCH
Constant for depth-first-search
-
Constructor Summary
Constructors Constructor Description NetworkAnalyst(NetworkIO reader, NetworkAnalysisConfig config)
Constructs an instance of NetworkAnalyst.
-
Method Summary
All Methods Instance Methods Concrete Methods Deprecated Methods Modifier and Type Method Description LogicalSubPath[]
allDetourShortestPathsWithCostLimit(PointOnNet[] startPoints, PointOnNet[] endPoints, double maxCost, LODNetworkConstraint constraint)
Finds all paths from the start points to the end points with the following properties: The cost of the path is smaller than or equal to the given cost bound The subpath from the start points to any intermediate node on the path is the shortest possible path from the start points to that node.LogicalSubPath[]
allDetourShortestPathsWithDepthLimit(PointOnNet[] startPoints, PointOnNet[] endPoints, int maxDepth, LODNetworkConstraint constraint)
Finds all paths from the start points to the end points with the following properties: The depth of the path is smaller than or equal to the given depth bound The subpath from the start points to any intermediate node on the path is the shortest possible path from the start points to that node.ClusterResult
bisectClustering(PointOnNet[] points, int numClusters, int userDataCategory, int xCoordUserDataIndex, int yCoordUserDataIndex, int geometryUserDataIndex)
JGeometry
fastWithinCostPolygon(PointOnNet[] startPoints, double cost, LODNetworkConstraint constraint, LODGoalNode goalNodeFilter)
Returns the polygon covering the nodes, links or partial links that are within the given cost from the start point candidates.JGeometry
fastWithinCostPolygon(PointOnNet[] startPoints, double cost, LODNetworkConstraint constraint, LODGoalNode goalNodeFilter, boolean isLowAccuracy)
Returns the polygon covering the nodes, links or partial links that are within the given cost from the start point candidates.protected JGeometry
fastWithinCostPolygonUsingNetworkBuffer(PointOnNet[] startPoints, double cost, int direction, LODNetworkConstraint constraint, boolean isLowAccuracy)
protected JGeometry
fastWithinCostPolygonUsingWithinCostNodes(PointOnNet[] startPoints, double cost, int direction, LODNetworkConstraint constraint, LODGoalNode goalNodeFilter, boolean isLowAccuracy)
protected JGeometry
fastWithinCostPolygonUsingWithinCostPoints(PointOnNet[] startPoints, double cost, int direction, LODNetworkConstraint constraint, LODGoalNode goalNodeFilter, boolean isLowAccuracy)
JGeometry
fastWithinReachingCostPolygon(PointOnNet[] endPoints, double cost, LODNetworkConstraint constraint, LODGoalNode goalNodeFilter)
Returns the polygon covering the nodes, links or partial links that are within the given cost to the end point candidates.JGeometry
fastWithinReachingCostPolygon(PointOnNet[] endPoints, double cost, LODNetworkConstraint constraint, LODGoalNode goalNodeFilter, boolean isLowAccuracy)
Returns the polygon covering the nodes, links or partial links that are within the given cost to the end point candidates.OrderedLongSet[]
findConnectedComponents(int linkLevel)
Finds the connected components for the given link level.int
findConnectedComponentsInPartition(int partitionId, int linkLevel, int startComponentId, java.util.ArrayList<oracle.spatial.network.lod.AnalysisUtility.NodeComponent> nodeComponentArray)
Find the connected components within a partition, with all the external nodes and boundary links included.OrderedLongSet
findConnectedNodes(int searchMethod, long nodeId, int linkLevel, LODNetworkConstraint constraint, LODGoalNode goalNode)
OrderedLongSet
findConnectedNodes(int searchMethod, PointOnNet[] points, int linkLevel, LODNetworkConstraint constraint, LODGoalNode goalNode)
Finds the nodes connected to the given points.Feature[]
findReachableFeatures(int searchMethod, PointOnNet[] startPoints, int linkLevel, int[] featureLayerIds, LODNetworkConstraint constraint, FeatureFilter featureFilter)
Finds the nodes reachable from the given node.OrderedLongSet
findReachableNodes(int searchMethod, long startNodeId, int linkLevel, LODNetworkConstraint constraint, LODGoalNode goalNode)
OrderedLongSet
findReachableNodes(int searchMethod, PointOnNet[] startPoints, int linkLevel, LODNetworkConstraint constraint, LODGoalNode goalNode)
Finds the nodes reachable from the given points.Feature[]
findReachingFeatures(int searchMethod, PointOnNet[] startPoints, int linkLevel, int[] featureLayerIds, LODNetworkConstraint constraint, FeatureFilter featureFilter)
Finds the nodes that can reach the given node.OrderedLongSet
findReachingNodes(int searchMethod, long endNodeId, int linkLevel, LODNetworkConstraint constraint, LODGoalNode goalNode)
OrderedLongSet
findReachingNodes(int searchMethod, PointOnNet[] endPoints, int linkLevel, LODNetworkConstraint constraint, LODGoalNode goalNode)
Finds the nodes that can reach the given points.LODGoalNode[]
getGoalNodeFilters()
Returns the default goal node filters to be applied to all analysis functions.KShortestPaths
getKShortestPathsAlgorithm()
Returns the default k-shortest paths algorithm.LinkCostCalculator
getLinkCostCalculator()
Returns the primary link cost calculator.LinkCostCalculator[]
getLinkCostCalculators()
Returns the link cost calculators.LinkLevelSelector
getLinkLevelSelector()
Returns the link level selector to be used by all analysis functions.LODNetworkConstraint[]
getNetworkConstraints()
Returns the default network constraints to be applied to all analysis functions.NetworkExplorer
getNetworkExplorer()
Returns the network explorer used by this network analyst.NodeCostCalculator
getNodeCostCalculator()
Returns the primary node cost calculator.NodeCostCalculator[]
getNodeCostCalculators()
Returns the node cost calculators.PairwiseCostCalculator
getPairwiseCostCalculator()
Returns the default pairwise cost calculator.PairwiseShortestPaths
getPairwiseShortestPathsAlgorithm()
Returns the default pairwise shortest paths algorithm.ShortestPath
getShortestPathAlgorithm()
Returns the default shortest path algorithm.TSP
getTspAlgorithm()
Returns the default TSP algorithm.boolean
isReachable(long startNodeId, long endNodeId, int linkLevel, LODNetworkConstraint constraint)
Checks whether there is a path from the start node to the end node using the given link level for long-haul search.boolean
isReachable(Feature[] start, Feature[] end, int linkLevel, LODNetworkConstraint constraint)
Checks whether there is a path from the start features to the end features using the given link level for long-haul search.boolean
isReachable(PointOnNet[] startPoints, PointOnNet[] endPoints, int linkLevel, LODNetworkConstraint constraint)
Checks whether there is a path from the start node to the end node using the given link level for long-haul search.ClusterResult
kMeansClustering(PointOnNet[] points, int numClusters, int maxSize, int minSize, int userDataCategory, int xCoordUserDataIndex, int yCoordUserDataIndex, int geometryUserDataIndex)
PathFeature[]
kShortestPaths(Feature[] start, Feature[] end, int k, LODNetworkConstraint constraint, KShortestPaths algorithm)
Finds the top k shortest paths from the start feature candidates to the end feature candidates.LogicalSubPath[]
kShortestPaths(PointOnNet[] startPoint, PointOnNet[] endPoint, int k, LODNetworkConstraint constraint)
Returns K shortest loopless paths from the start point candidates to the end point candidates.LogicalSubPath[]
kShortestPaths(PointOnNet[] startPoint, PointOnNet[] endPoint, int k, LODNetworkConstraint constraint, KShortestPaths kspAlgorithm)
Returns K shortest loopless paths from the start point candiates to the end point candidates.LogicalSubPath[]
kShortestPaths(PointOnNet[] startPoint, PointOnNet[] endPoint, int k, LODNetworkConstraint constraint, PathFilter pathFilter, KShortestPaths kspAlgorithm)
LogicalSubPath[]
kShortestPathsBfs(PointOnNet[] startPoint, PointOnNet[] endPoint, int k, double maxToMinBound, long timeout, LODNetworkConstraint constraint, PathFilter pathFilter)
Returns K shortest loopless paths from the start point candidates to the end point candidates.LogicalSubPath[]
kShortestPathsDijkstra(PointOnNet[] startPoint, PointOnNet[] endPoint, int k, double maxToMinBound, long timeout, LODNetworkConstraint constraint, PathFilter pathFilter)
Returns K shortest paths from the start point candidates to the end point candidates.long[]
mcst(int linkLevel, LODNetworkConstraint constraint)
Deprecated.long[]
mcst(int linkLevel, LODNetworkConstraint constraint, NetworkUpdate tmpNetworkUpdate)
Deprecated.SpanningTree
mst(int linkLevel, LODNetworkConstraint constraint)
Returns the minimum-spanning-tree for the network on the given link level.SpanningTree
mst(int linkLevel, LODNetworkConstraint constraint, MinimumSpanningTree algorithm)
Returns the minimum-spanning-tree for the network on the given link level.FeaturePath[]
nearestFeatures(Feature[] start, int numberOfFeatures, int[] featureLayerIds, LODNetworkConstraint constraint, FeatureFilter featureFilter)
Finds the nearest features from the start feature candidates.FeaturePath[]
nearestFeatures(PointOnNet[] startPoints, int numberOfFeatures, int[] featureLayerIds, LODNetworkConstraint constraint, FeatureFilter featureFilter)
Finds the nearest features from the start point candidates.LogicalSubPath[]
nearestNeighbors(PointOnNet[] startPoints, int numberOfNeighbors, int searchLinkLevel, int targetLinkLevel, LODNetworkConstraint constraint, LODGoalNode goalNodeFilter)
Finds the nearest neighbors from the start point candidates.LogicalSubPath[]
nearestNeighbors(PointOnNet startPoint, int numberOfNeighbors, int searchLinkLevel, int targetLinkLevel, LODNetworkConstraint constraint, LODGoalNode goalNodeFilter)
Finds the nearest neighbors from the start point.LogicalSubPath[]
nearestNeighbors(PointOnNet startPoint, int numberOfNeighbors, int targetLinkLevel, LODNetworkConstraint constraint, LODGoalNode goalNodeFilter)
Finds the nearest neighbors from the start point.LogicalSubPath[]
nearestNeighbors(PointOnNet startPoint, int numberOfNeighbors, LODNetworkConstraint constraint, LODGoalNode goalNodeFilter)
Finds the nearest neighbors from the start point.LogicalLightSubPath[]
nearestNeighborsLight(PointOnNet[] startPoints, int numberOfNeighbors, int searchLinkLevel, int targetLinkLevel, LODNetworkConstraint constraint, LODGoalNode goalNodeFilter)
Finds the nearest neighbors from the start point candidates.PathToPoint[]
nearestPoints(PointOnNet[] startPoints, PointOnNet[][] targetPoints, int k, LODNetworkConstraint constraint, boolean returnFullPath)
Returns the top k nearest target points from the start points.FeaturePath[]
nearestReachingFeatures(Feature[] end, int numberOfFeatures, int[] featureLayerIds, LODNetworkConstraint constraint, FeatureFilter featureFilter)
Finds the nearest reaching features to the end feature candidates.FeaturePath[]
nearestReachingFeatures(PointOnNet[] endPoints, int numberOfFeatures, int[] featureLayerIds, LODNetworkConstraint constraint, FeatureFilter featureFilter)
Finds the nearest reaching features to the end point candidates.LogicalSubPath[]
nearestReachingNeighbors(PointOnNet[] endPoints, int numberOfNeighbors, int searchLinkLevel, int targetLinkLevel, LODNetworkConstraint constraint, LODGoalNode goalNodeFilter)
Finds the nearest reaching neighbors to the end point candidates.LogicalSubPath[]
nearestReachingNeighbors(PointOnNet endPoint, int numberOfNeighbors, int searchLinkLevel, int targetLinkLevel, LODNetworkConstraint constraint, LODGoalNode goalNodeFilter)
Finds the nearest reaching neighbors to the end point.LogicalSubPath[]
nearestReachingNeighbors(PointOnNet endPoint, int numberOfNeighbors, int targetLinkLevel, LODNetworkConstraint constraint, LODGoalNode goalNodeFilter)
Finds the nearest reaching neighbors to the end point.LogicalSubPath[]
nearestReachingNeighbors(PointOnNet endPoint, int numberOfNeighbors, LODNetworkConstraint constraint, LODGoalNode goalNodeFilter)
Finds the nearest reaching neighbors to the end point.LogicalLightSubPath[]
nearestReachingNeighborsLight(PointOnNet[] endPoints, int numberOfNeighbors, int searchLinkLevel, int targetLinkLevel, LODNetworkConstraint constraint, LODGoalNode goalNodeFilter)
Finds the nearest reaching neighbors to the end point candidates.PathToPoint[]
nearestReachingPoints(PointOnNet[] startPoints, PointOnNet[][] targetPoints, int k, LODNetworkConstraint constraint, boolean returnFullPath)
Returns the top k nearest reaching target points to the start points.NetworkBuffer
networkBuffer(PointOnNet[] startPoints, double cost, LODNetworkConstraint constraint)
Computes network buffer within the given cost from the start point candidates.NetworkBuffer
reachingNetworkBuffer(PointOnNet[] endPoints, double cost, LODNetworkConstraint constraint)
Computes network buffer within the given cost to the end point candidates.void
resetCostCalculators()
Restores the default settings of link cost calculators and node cost calculators, which uses the DefaultLinkCostCalculator as the primary link cost calculator and the DefaultNodeCostCalculator as the primary node cost calculator.PathFeature[]
reverseKShortestPaths(Feature[] end, Feature[] start, int k, LODNetworkConstraint constraint, KShortestPaths algorithm)
Finds the top k shortest paths from the start feature candidates to the end feature candidates, using reverse search direction.LogicalSubPath[]
reverseKShortestPaths(PointOnNet[] endPoint, PointOnNet[] startPoint, int k, LODNetworkConstraint constraint)
Returns K shortest loopless paths from the start point candidates to the end point candidates, using reverse search direction.LogicalSubPath[]
reverseKShortestPaths(PointOnNet[] endPoint, PointOnNet[] startPoint, int k, LODNetworkConstraint constraint, KShortestPaths kspAlgorithm)
Returns reverse K shortest loopless paths from the start point candiates to the end point candidates, using reverse search direction.LogicalSubPath[]
reverseKShortestPaths(PointOnNet[] endPoint, PointOnNet[] startPoint, int k, LODNetworkConstraint constraint, PathFilter pathFilter, KShortestPaths kspAlgorithm)
LogicalSubPath[]
reverseKShortestPathsBfs(PointOnNet[] startPoint, PointOnNet[] endPoint, int k, double maxToMinBound, long timeout, LODNetworkConstraint constraint, PathFilter pathFilter)
Returns K shortest loopless paths from the start point candidates to the end point candidates.LogicalSubPath[]
reverseKShortestPathsDijkstra(PointOnNet[] startPoint, PointOnNet[] endPoint, int k, double maxToMinBound, long timeout, LODNetworkConstraint constraint, PathFilter pathFilter)
Returns K shortest loopless paths from the start point candidates to the end point candidates.PathFeature
reverseShortestPath(Feature[] end, Feature[] start, LODNetworkConstraint constraint, ShortestPath algorithm)
Finds the shortest path from the start feature candidates to the end feature candidates, using reverse search direction.LogicalSubPath
reverseShortestPath(PointOnNet[] endPoints, PointOnNet[] startPoints, LODNetworkConstraint constraint, ShortestPath algorithm)
Finds the shortest path using the input algorithm, using reverse search direction.void
setKShortestPathsAlgorithm(KShortestPaths kspAlgorithm)
Sets the default k-shortest paths algorithm.void
setLinkCostCalculator(LinkCostCalculator calculator)
Sets the primary link cost calculator, and removes all secondary link cost calculators.void
setLinkCostCalculators(LinkCostCalculator[] calculators)
Sets the link cost calculators.void
setNetworkExplorer(NetworkExplorer ne)
void
setNetworkUpdate(java.util.HashMap<java.lang.Integer,NetworkUpdate> networkUpdates)
Sets the network update objects.void
setNetworkUpdates(java.util.HashMap<java.lang.Integer,NetworkUpdate> networkUpdates)
Sets the network update objects.void
setNodeCostCalculator(NodeCostCalculator calculator)
Sets the primary node cost calculator, and removes all secondary node cost calculators.void
setNodeCostCalculators(NodeCostCalculator[] calculators)
Sets the node cost calculators.void
setPairwiseCostCalculator(PairwiseCostCalculator pwcc)
Sets the default pairwise cost calculator.void
setPairwiseShortestPathsAlgorithm(PairwiseShortestPaths pwspAlgorithm)
Sets the default pairwise shortest paths algorithm.void
setShortestPathAlgorithm(ShortestPath spAlgorithm)
Sets the default shortest path algorithm.void
setTspAlgorithm(TSP tspAlgorithm)
Sets the default TSP algorithm.PathFeature
shortestPath(Feature[] start, Feature[] end, LODNetworkConstraint constraint, ShortestPath algorithm)
Finds the shortest path from the start feature candidates to the end feature candidates.LogicalSubPath
shortestPath(PointOnNet[] startPoints, PointOnNet[] endPoints, LODNetworkConstraint constraint, ShortestPath algorithm)
Finds the shortest path using the input algorithm.PathFeature
shortestPathAStar(Feature[] start, Feature[] end, LODNetworkConstraint constraint, HeuristicCostFunction hcf, LinkLevelSelector lls)
Finds the shortest path from the start feature candidates to the end feature candidates.LogicalSubPath
shortestPathAStar(PointOnNet[] startPoints, PointOnNet[] endPoints, LODNetworkConstraint constraint, HeuristicCostFunction hcf, LinkLevelSelector lls)
Finds the shortest path using A* algorithm.LogicalSubPath
shortestPathAStar(PointOnNet startPoint, PointOnNet endPoint, int searchLinkLevel, LODNetworkConstraint constraint, HeuristicCostFunction hcf, double[] costThresholds)
Finds the shortest path using A* algorithm with dynamic link level selector.LogicalSubPath
shortestPathAStar(PointOnNet startPoint, PointOnNet endPoint, LODNetworkConstraint constraint, HeuristicCostFunction hcf, double[] costThresholds)
Finds the shortest path using A* algorithm using dynamic link level selector.LogicalSubPath
shortestPathAStar(PointOnNet startPoint, PointOnNet endPoint, LODNetworkConstraint constraint, HeuristicCostFunction hcf, LinkLevelSelector lls)
Finds the shortest path using A* algorithm.PathFeature
shortestPathDijkstra(Feature[] start, Feature[] end, LODNetworkConstraint constraint, LinkLevelSelector lls)
Finds the shortest path from the start feature candidates to the end feature candidates.LogicalSubPath
shortestPathDijkstra(PointOnNet[] startPoints, PointOnNet[] endPoints, int searchLinkLevel, int maxHighLevelNodesToConsider, LODNetworkConstraint constraint)
Finds the shortest path using Dijkstra algorithm where the long-haul path is computed on the given link level.LogicalSubPath
shortestPathDijkstra(PointOnNet[] startPoints, PointOnNet[] endPoints, int searchLinkLevel, LODNetworkConstraint constraint)
Finds the shortest path using Dijkstra algorithm where the long-haul path is computed on the given link level.LogicalSubPath
shortestPathDijkstra(PointOnNet[] startPoints, PointOnNet[] endPoints, LODNetworkConstraint constraint, LinkLevelSelector lls)
Finds the shortest path using Dijkstra algorithm with the given link level selector.LogicalSubPath
shortestPathDijkstra(PointOnNet startPoint, PointOnNet endPoint, int searchLinkLevel, LODNetworkConstraint constraint)
Finds the shortest path using Dijkstra algorithm where the long-haul path is computed on the given link level.LogicalSubPath
shortestPathDijkstra(PointOnNet startPoint, PointOnNet endPoint, LODNetworkConstraint constraint)
Finds the shortest path on the minimum link level using Dijkstra algorithm.LogicalSubPath
shortestPathDijkstraMaxLevel(PointOnNet startPoint, PointOnNet endPoint, LODNetworkConstraint constraint)
Finds the shortest path using Dijkstra algorithm where the long-haul path is computed on the maximum link level.LogicalSubPath
shortestPathHierarchical(PointOnNet[] startPoints, PointOnNet[] endPoints, int searchLinkLevel, int maxHighLevelNodesToConsider, LODNetworkConstraint constraint, ShortestPath algorithm)
Finds the shortest path from the start point candidates to the end point candidates.LogicalSubPath[]
traceIn(PointOnNet[] endPoints, double cost, int searchLinkLevel, int targetLinkLevel, LODNetworkConstraint constraint, LODGoalNode goalNodeFilter, boolean returnBoundaryPointsOnly)
Finds the nodes and partial links within the given cost to the end point candidates.LogicalSubPath[]
traceIn(PointOnNet endPoint, double cost, int searchLinkLevel, int targetLinkLevel, LODNetworkConstraint constraint, LODGoalNode goalNodeFilter)
Finds the nodes and partial links within the given cost to the end point.LogicalSubPath[]
traceIn(PointOnNet endPoint, double cost, int targetLinkLevel, LODNetworkConstraint constraint, LODGoalNode goalNodeFilter)
Finds the nodes and partial links within the given cost to the end point.LogicalSubPath[]
traceIn(PointOnNet endPoint, double cost, LODNetworkConstraint constraint, LODGoalNode goalNodeFilter)
Finds the nodes and partial links within the given cost to the end point.LogicalLightSubPath[]
traceInLight(PointOnNet[] startPoints, double cost, int searchLinkLevel, int targetLinkLevel, LODNetworkConstraint constraint, LODGoalNode goalNodeFilter, boolean returnBoundaryPointsOnly)
Finds the nodes and partial links within the given cost to the end point candidates.LogicalSubPath[]
traceOut(PointOnNet[] startPoints, double cost, int searchLinkLevel, int targetLinkLevel, LODNetworkConstraint constraint, LODGoalNode goalNodeFilter, boolean returnBoundaryPointsOnly)
Finds the nodes and partial links within the given cost from the start point candidates.LogicalSubPath[]
traceOut(PointOnNet startPoint, double cost, int searchLinkLevel, int targetLinkLevel, LODNetworkConstraint constraint, LODGoalNode goalNodeFilter)
Finds the nodes and partial links within the given cost from the start point.LogicalSubPath[]
traceOut(PointOnNet startPoint, double cost, int targetLinkLevel, LODNetworkConstraint constraint, LODGoalNode goalNodeFilter)
Finds the nodes and partial links within the given cost from the start point.LogicalSubPath[]
traceOut(PointOnNet startPoint, double cost, LODNetworkConstraint constraint, LODGoalNode goalNodeFilter)
Finds the nodes and partial links within the given cost from the start point.protected LogicalLightSubPath[]
traceOutInternal(PointOnNet[] startPoints, double cost, int direction, int searchLinkLevel, int targetLinkLevel, LODNetworkConstraint constraint, LODGoalNode goalNodeFilter, boolean returnFullPath, boolean returnBoundaryPointsOnly)
protected LogicalLightSubPath[]
traceOutInternalNoReversePath(PointOnNet[] startPoints, double cost, int direction, int searchLinkLevel, int targetLinkLevel, LODNetworkConstraint constraint, LODGoalNode goalNodeFilter, boolean returnFullPath, boolean returnBoundaryPointsOnly)
Finds the nodes and partial links within the given cost from/to the start/end point candidates.LogicalLightSubPath[]
traceOutLight(PointOnNet[] startPoints, double cost, int searchLinkLevel, int targetLinkLevel, LODNetworkConstraint constraint, LODGoalNode goalNodeFilter, boolean returnBoundaryPointsOnly)
Finds the nodes and partial links within the given cost from the start points.TspPathFeature
tsp(Feature[][] featuresToVisit, TSP.TourFlag tourFlag, LODNetworkConstraint constraint, TSP algorithm)
Returns the traveling salesman tour covering the input features.TspPathFeature
tsp(Feature[][] featuresToVisit, TSP.TourFlag tourFlag, LODNetworkConstraint networkConstraint, TspConstraint tspConstraint, TSP algorithm)
Returns the traveling salesman tour covering the input features.TspPath
tsp(PointOnNet[][] pointsToVisit, TSP.TourFlag tourFlag, int linkLevel, LODNetworkConstraint constraint)
Returns the traveling salesman tour covering the given points.TspPath
tsp(PointOnNet[][] pointsToVisit, TSP.TourFlag tourFlag, int linkLevel, LODNetworkConstraint constraint, TSP algorithm)
Returns the traveling salesman tour covering the input points.TspPath
tsp(PointOnNet[][] pointsToVisit, TSP.TourFlag tourFlag, LODNetworkConstraint networkConstraint)
Returns the traveling salesman tour covering the input points.TspPath
tsp(PointOnNet[][] pointsToVisit, TSP.TourFlag tourFlag, LODNetworkConstraint networkConstraint, TSP algorithm)
Returns the traveling salesman tour covering the input points.TspPath
tsp(PointOnNet[][] pointsToVisit, TSP.TourFlag tourFlag, LODNetworkConstraint networkConstraint, TspConstraint tspConstraint)
Returns the traveling salesman tour covering the input points.TspPath
tsp(PointOnNet[][] pointsToVisit, TSP.TourFlag tourFlag, LODNetworkConstraint networkConstraint, TspConstraint tspConstraint, TSP algorithm)
Returns the traveling salesman tour covering the input points.TspPath[]
vrpNoDepot(PointOnNet[][] points, int numVehicles, LODNetworkConstraint networkConstraint, TspConstraint tspConstraint, int userDataCategory, int xUserDataIndex, int yUserDataIndex, int geometryUserDataIndex)
TspPath[]
vrpNoDepot(PointOnNet[][] points, int numVehicles, LODNetworkConstraint networkConstraint, TspConstraint tspConstraint, VRP vrpAlgo)
TspPath[]
vrpSingleDepot(PointOnNet[][] points, int numVehicles, PointOnNet[] depot, LODNetworkConstraint networkConstraint, TspConstraint tspConstraint, int userDataCategory, int xUserDataIndex, int yUserDataIndex, int geometryUserDataIndex)
TspPath[]
vrpSingleDepot(PointOnNet[][] points, int numVehicles, PointOnNet[] depot, LODNetworkConstraint networkConstraint, TspConstraint tspConstraint, VRP vrpAlgo)
LogicalSubPath[]
withinCost(PointOnNet[] startPoints, double cost, int searchLinkLevel, int targetLinkLevel, LODNetworkConstraint constraint, LODGoalNode goalNodeFilter, boolean returnBoundaryNodesOnly)
Finds the nodes within the given cost from the start point candidates.LogicalSubPath[]
withinCost(PointOnNet startPoint, double cost, int searchLinkLevel, int targetLinkLevel, LODNetworkConstraint constraint, LODGoalNode goalNodeFilter)
Finds the nodes within the given cost from the start point.LogicalSubPath[]
withinCost(PointOnNet startPoint, double cost, int targetLinkLevel, LODNetworkConstraint constraint, LODGoalNode goalNodeFilter)
Finds the nodes within the given cost from the start point.LogicalSubPath[]
withinCost(PointOnNet startPoint, double cost, LODNetworkConstraint constraint, LODGoalNode goalNodeFilter)
Finds the nodes within the given cost from the start point.FeaturePath[]
withinCostFeatures(Feature[] start, double cost, int[] featureLayerIds, LODNetworkConstraint constraint, FeatureFilter featureFilter)
Finds features within the given cost from the start features.FeaturePath[]
withinCostFeatures(PointOnNet[] startPoints, double cost, int[] featureLayerIds, LODNetworkConstraint constraint, FeatureFilter featureFilter)
Finds features within the given cost from the start features.protected LogicalLightSubPath[]
withinCostInternal(PointOnNet[] startPoints, double cost, int direction, int searchLinkLevel, int targetLinkLevel, LODNetworkConstraint constraint, LODGoalNode goalNodeFilter, boolean returnFullPath, boolean returnBoundaryNodesOnly)
protected LogicalLightSubPath[]
withinCostInternalNoReverse(PointOnNet[] startPoints, double cost, int direction, int searchLinkLevel, int targetLinkLevel, LODNetworkConstraint constraint, LODGoalNode goalNodeFilter, boolean returnFullPath, boolean returnBoundaryNodesOnly)
Finds the nodes within the given cost from/to the input points.LogicalLightSubPath[]
withinCostLight(PointOnNet[] startPoints, double cost, int searchLinkLevel, int targetLinkLevel, LODNetworkConstraint constraint, LODGoalNode goalNodeFilter, boolean returnBoundaryNodesOnly)
Finds the nodes within the given cost from the start point candidates.protected LogicalLightSubPath[]
withinCostOnLinkLevel(PointOnNet[] startPoints, double cost, int direction, int linkLevel, LODNetworkConstraint constraint, LODGoalNode goalNode, boolean returnFullPath, boolean returnBoundaryNodesOnly)
PathToPoint[]
withinCostPoints(PointOnNet[] startPoints, PointOnNet[][] targetPoints, double cost, LODNetworkConstraint constraint, boolean returnFullPath)
JGeometry
withinCostPolygon(Feature[] startFeatures, double cost, LODNetworkConstraint constraint, LODGoalNode goalNodeFilter)
Returns the polygon covering the nodes, links or partial links that are within the given cost from the start feature candidates.JGeometry
withinCostPolygon(PointOnNet[] startPoints, double cost, LODNetworkConstraint constraint, LODGoalNode goalNodeFilter)
Returns the polygon covering the nodes, links or partial links that are within the given cost from the start point candidates.JGeometry
withinCostPolygon(PointOnNet[] startPoints, double cost, LODNetworkConstraint constraint, LODGoalNode goalNodeFilter, int accuracyLevel)
Returns the polygon covering the nodes, links or partial links that are within the given cost from the start point candidates.protected JGeometry
withinCostPolygonInternal(PointOnNet[] startPoints, double cost, boolean considerBoundaryPointsOnly, int direction, LODNetworkConstraint constraint, LODGoalNode goalNodeFilter)
protected JGeometry
withinCostPolygonInternal(PointOnNet[] startPoints, double cost, int direction, LODNetworkConstraint constraint, LODGoalNode goalNodeFilter)
protected JGeometry
withinCostPolygonInternal(PointOnNet[] startPoints, double cost, int direction, LODNetworkConstraint constraint, LODGoalNode goalNodeFilter, int accuracyLevel)
protected JGeometry
withinCostPolygonUsingTraceOutPoints(PointOnNet[] startPoints, double cost, int direction, LODNetworkConstraint constraint, LODGoalNode goalNodeFilter, boolean useBoundaryPointsOnly)
protected JGeometry
withinCostPolygonUsingWithinCostNodes(PointOnNet[] startPoints, double cost, int direction, LODNetworkConstraint constraint, LODGoalNode goalNodeFilter, boolean useBoundaryNodesOnly)
protected JGeometry
withinCostPolygonUsingWithinCostPoints(PointOnNet[] startPoints, double cost, int direction, LODNetworkConstraint constraint, LODGoalNode goalNodeFilter, boolean useBoundaryPointsOnly)
LogicalSubPath[]
withinReachingCost(PointOnNet[] endPoints, double cost, int searchLinkLevel, int targetLinkLevel, LODNetworkConstraint constraint, LODGoalNode goalNodeFilter, boolean returnBoundaryNodesOnly)
Finds the nodes within the given cost to the end point candidates.LogicalSubPath[]
withinReachingCost(PointOnNet endPoint, double cost, int searchLinkLevel, int targetLinkLevel, LODNetworkConstraint constraint, LODGoalNode goalNodeFilter)
Finds the nodes within the given cost to the end point.LogicalSubPath[]
withinReachingCost(PointOnNet endPoint, double cost, int targetLinkLevel, LODNetworkConstraint constraint, LODGoalNode goalNodeFilter)
Finds the nodes within the given cost to the end point.LogicalSubPath[]
withinReachingCost(PointOnNet endPoint, double cost, LODNetworkConstraint constraint, LODGoalNode goalNodeFilter)
Finds the nodes within the given cost to the end point.FeaturePath[]
withinReachingCostFeatures(Feature[] endFeatures, double cost, int[] featureLayerIds, LODNetworkConstraint constraint, FeatureFilter featureFilter)
Finds features within the given cost to the end features.FeaturePath[]
withinReachingCostFeatures(PointOnNet[] endPoints, double cost, int[] featureLayerIds, LODNetworkConstraint constraint, FeatureFilter featureFilter)
Finds features within the given cost to the end features.LogicalLightSubPath[]
withinReachingCostLight(PointOnNet[] endPoints, double cost, int searchLinkLevel, int targetLinkLevel, LODNetworkConstraint constraint, LODGoalNode goalNodeFilter, boolean returnBoundaryNodesOnly)
Finds the nodes within the given cost to the end points.PathToPoint[]
withinReachingCostPoints(PointOnNet[] startPoints, PointOnNet[][] targetPoints, double cost, LODNetworkConstraint constraint, boolean returnFullPath)
JGeometry
withinReachingCostPolygon(Feature[] endFeatures, double cost, LODNetworkConstraint constraint, LODGoalNode goalNodeFilter)
Returns the polygon covering the nodes, links or partial links that are within the given cost to the end feature candidates.JGeometry
withinReachingCostPolygon(PointOnNet[] endPoints, double cost, LODNetworkConstraint constraint, LODGoalNode goalNodeFilter)
Returns the polygon covering the nodes, links or partial links that are within the given cost to the end point candidates.JGeometry
withinReachingCostPolygon(PointOnNet[] endPoints, double cost, LODNetworkConstraint constraint, LODGoalNode goalNodeFilter, int accuracyLevel)
Returns the polygon covering the nodes, links or partial links that are within the given cost to the end point candidates.
-
-
-
Field Detail
-
BREADTH_FIRST_SEARCH
public static final int BREADTH_FIRST_SEARCH
Constant for bread-first-search- See Also:
- Constant Field Values
-
DEPTH_FIRST_SEARCH
public static final int DEPTH_FIRST_SEARCH
Constant for depth-first-search- See Also:
- Constant Field Values
-
ACCURACY_LEVEL_LOWEST
public static final int ACCURACY_LEVEL_LOWEST
- See Also:
- Constant Field Values
-
ACCURACY_LEVEL_LOW
public static final int ACCURACY_LEVEL_LOW
- See Also:
- Constant Field Values
-
ACCURACY_LEVEL_MEDIUM
public static final int ACCURACY_LEVEL_MEDIUM
- See Also:
- Constant Field Values
-
ACCURACY_LEVEL_HIGH
public static final int ACCURACY_LEVEL_HIGH
- See Also:
- Constant Field Values
-
ACCURACY_LEVEL_HIGHEST
public static final int ACCURACY_LEVEL_HIGHEST
- See Also:
- Constant Field Values
-
-
Constructor Detail
-
NetworkAnalyst
public NetworkAnalyst(NetworkIO reader, NetworkAnalysisConfig config) throws LODNetworkException
Constructs an instance of NetworkAnalyst.- Parameters:
reader
- network reader for the network to be analyzed- Throws:
LODNetworkException
-
-
Method Detail
-
getNetworkExplorer
public NetworkExplorer getNetworkExplorer()
Returns the network explorer used by this network analyst.
-
setNetworkExplorer
public void setNetworkExplorer(NetworkExplorer ne)
-
setNetworkUpdates
public void setNetworkUpdates(java.util.HashMap<java.lang.Integer,NetworkUpdate> networkUpdates)
Sets the network update objects. These objects will be super imposed to the static network information during network analysis.- Parameters:
networkUpdates
- network update objects for different link levels
-
setNetworkUpdate
public void setNetworkUpdate(java.util.HashMap<java.lang.Integer,NetworkUpdate> networkUpdates)
Sets the network update objects. These objects will be super imposed to the static network information during network analysis.- Parameters:
networkUpdates
- network update objects for different link levels
-
getGoalNodeFilters
public LODGoalNode[] getGoalNodeFilters()
Returns the default goal node filters to be applied to all analysis functions.- Returns:
-
getNetworkConstraints
public LODNetworkConstraint[] getNetworkConstraints()
Returns the default network constraints to be applied to all analysis functions.- Returns:
-
getLinkLevelSelector
public LinkLevelSelector getLinkLevelSelector()
Returns the link level selector to be used by all analysis functions.- Returns:
-
getShortestPathAlgorithm
public ShortestPath getShortestPathAlgorithm()
Returns the default shortest path algorithm.- Returns:
-
setShortestPathAlgorithm
public void setShortestPathAlgorithm(ShortestPath spAlgorithm)
Sets the default shortest path algorithm.- Parameters:
spAlgorithm
-
-
getKShortestPathsAlgorithm
public KShortestPaths getKShortestPathsAlgorithm()
Returns the default k-shortest paths algorithm.- Returns:
-
setKShortestPathsAlgorithm
public void setKShortestPathsAlgorithm(KShortestPaths kspAlgorithm)
Sets the default k-shortest paths algorithm.- Parameters:
kspAlgorithm
-
-
getPairwiseShortestPathsAlgorithm
public PairwiseShortestPaths getPairwiseShortestPathsAlgorithm()
Returns the default pairwise shortest paths algorithm.- Returns:
-
setPairwiseShortestPathsAlgorithm
public void setPairwiseShortestPathsAlgorithm(PairwiseShortestPaths pwspAlgorithm)
Sets the default pairwise shortest paths algorithm.- Parameters:
pwspAlgorithm
-
-
getPairwiseCostCalculator
public PairwiseCostCalculator getPairwiseCostCalculator()
Returns the default pairwise cost calculator.- Returns:
-
setPairwiseCostCalculator
public void setPairwiseCostCalculator(PairwiseCostCalculator pwcc)
Sets the default pairwise cost calculator.- Parameters:
pwcc
-
-
getTspAlgorithm
public TSP getTspAlgorithm()
Returns the default TSP algorithm.- Returns:
-
setTspAlgorithm
public void setTspAlgorithm(TSP tspAlgorithm)
Sets the default TSP algorithm.- Parameters:
tspAlgorithm
-
-
resetCostCalculators
public void resetCostCalculators()
Restores the default settings of link cost calculators and node cost calculators, which uses the DefaultLinkCostCalculator as the primary link cost calculator and the DefaultNodeCostCalculator as the primary node cost calculator. No secondary cost calculators are set.
-
setLinkCostCalculator
public void setLinkCostCalculator(LinkCostCalculator calculator)
Sets the primary link cost calculator, and removes all secondary link cost calculators. The primary link cost calculator is used to calculate the objective cost during network analysis.- Parameters:
calculator
- link cost calculator
-
getLinkCostCalculator
public LinkCostCalculator getLinkCostCalculator()
Returns the primary link cost calculator. The primary link cost calculator is used to calculate the objective cost during network analysis.- Returns:
- link cost calculator
-
setNodeCostCalculator
public void setNodeCostCalculator(NodeCostCalculator calculator)
Sets the primary node cost calculator, and removes all secondary node cost calculators. The primary node cost calculator is used to calculate the objective cost during network analysis.- Parameters:
calculator
- node cost calculator
-
getNodeCostCalculator
public NodeCostCalculator getNodeCostCalculator()
Returns the primary node cost calculator. The primary node cost calculator is used to calculate the objective cost during network analysis.- Returns:
- node cost calculator
-
setLinkCostCalculators
public void setLinkCostCalculators(LinkCostCalculator[] calculators)
Sets the link cost calculators. The first element in the array is the primary link cost calculator, which is used in calculating the objective cost during network analysis. The rest of the elements in the the array are secondary cost calculators, which can be used in network constraints.- Parameters:
calculators
- link cost calculators
-
getLinkCostCalculators
public LinkCostCalculator[] getLinkCostCalculators()
Returns the link cost calculators. The first element in the array is the primary link cost calculator, which is used in calculating the objective cost during network analysis. The rest of the elements in the the array are secondary cost calculators, which can be used in network constraints.- Returns:
- link cost calculators
-
setNodeCostCalculators
public void setNodeCostCalculators(NodeCostCalculator[] calculators)
Sets the node cost calculators. The first element in the array is the primary node cost calculator, which is used in calculating the objective cost during network analysis. The rest of the elements in the the array are secondary cost calculators, which can be used in network constraints.- Parameters:
calculators
- node cost calculators
-
getNodeCostCalculators
public NodeCostCalculator[] getNodeCostCalculators()
Returns the node cost calculators. The first element in the array is the primary node cost calculator, which is used in calculating the objective cost during network analysis. The rest of the elements in the the array are secondary cost calculators, which can be used in network constraints.- Returns:
- node cost calculators
-
nearestNeighbors
public LogicalSubPath[] nearestNeighbors(PointOnNet startPoint, int numberOfNeighbors, LODNetworkConstraint constraint, LODGoalNode goalNodeFilter) throws LODNetworkException
Finds the nearest neighbors from the start point. Both the search and the target link level are set to the lowest link level- Parameters:
startPoint
- start point on the networknumberOfNeighbors
- number of neighbors to be returnedconstraint
- network constraintgoalNodeFilter
- goal node implementation- Returns:
- paths to the nearest neighbors from the start point
- Throws:
LODNetworkException
-
nearestNeighbors
public LogicalSubPath[] nearestNeighbors(PointOnNet startPoint, int numberOfNeighbors, int targetLinkLevel, LODNetworkConstraint constraint, LODGoalNode goalNodeFilter) throws LODNetworkException
Finds the nearest neighbors from the start point. The search uses the lowest link level.- Parameters:
startPoint
- start point on the networknumberOfNeighbors
- number of neighbors to be returnedtargetLinkLevel
- maximum outgoing link level of the neighborsconstraint
- network constraintgoalNodeFilter
- goal node implementation- Returns:
- paths to the nearest neighbors from the start point
- Throws:
LODNetworkException
-
nearestNeighbors
public LogicalSubPath[] nearestNeighbors(PointOnNet startPoint, int numberOfNeighbors, int searchLinkLevel, int targetLinkLevel, LODNetworkConstraint constraint, LODGoalNode goalNodeFilter) throws LODNetworkException
Finds the nearest neighbors from the start point.- Parameters:
startPoint
- start point on the networknumberOfNeighbors
- number of neighbors to be returnedsearchLinkLevel
- the link level to search for neighborstargetLinkLevel
- maximum outgoing link level of the neighborsconstraint
- network constraintgoalNodeFilter
- goal node implementation- Returns:
- paths to the nearest neighbors from the start point
- Throws:
LODNetworkException
-
nearestNeighbors
public LogicalSubPath[] nearestNeighbors(PointOnNet[] startPoints, int numberOfNeighbors, int searchLinkLevel, int targetLinkLevel, LODNetworkConstraint constraint, LODGoalNode goalNodeFilter) throws LODNetworkException
Finds the nearest neighbors from the start point candidates.- Parameters:
startPoints
- start point candidates on the networknumberOfNeighbors
- number of neighbors to be returnedsearchLinkLevel
- the link level to search for neighborstargetLinkLevel
- maximum outgoing link level of the neighborsconstraint
- network constraintgoalNodeFilter
- goal node implementation- Returns:
- paths to the nearest neighbors from the start point candidates
- Throws:
LODNetworkException
-
nearestNeighborsLight
public LogicalLightSubPath[] nearestNeighborsLight(PointOnNet[] startPoints, int numberOfNeighbors, int searchLinkLevel, int targetLinkLevel, LODNetworkConstraint constraint, LODGoalNode goalNodeFilter) throws LODNetworkException
Finds the nearest neighbors from the start point candidates.- Parameters:
startPoints
- start point candidates on the networknumberOfNeighbors
- number of neighbors to be returnedsearchLinkLevel
- the link level to search for neighborstargetLinkLevel
- maximum outgoing link level of the neighborsconstraint
- network constraintgoalNodeFilter
- goal node implementation- Returns:
- paths to the nearest neighbors from the start point candidates
- Throws:
LODNetworkException
-
nearestReachingNeighbors
public LogicalSubPath[] nearestReachingNeighbors(PointOnNet endPoint, int numberOfNeighbors, LODNetworkConstraint constraint, LODGoalNode goalNodeFilter) throws LODNetworkException
Finds the nearest reaching neighbors to the end point. Both the search and the target link levels are set to the lowest link level.- Parameters:
endPoint
- end point on the networknumberOfNeighbors
- number of neighbors to be returnedconstraint
- network constraintgoalNodeFilter
- goal node implementation- Returns:
- paths from the nearest reaching neighbors to the end point
- Throws:
LODNetworkException
-
nearestReachingNeighbors
public LogicalSubPath[] nearestReachingNeighbors(PointOnNet endPoint, int numberOfNeighbors, int targetLinkLevel, LODNetworkConstraint constraint, LODGoalNode goalNodeFilter) throws LODNetworkException
Finds the nearest reaching neighbors to the end point. The search uses the lowest link level.- Parameters:
endPoint
- end point on the networknumberOfNeighbors
- number of neighbors to be returnedtargetLinkLevel
- maximum incoming link level of the neighborsconstraint
- network constraintgoalNodeFilter
- goal node implementation- Returns:
- paths from the nearest reaching neighbors to the end point
- Throws:
LODNetworkException
-
nearestReachingNeighbors
public LogicalSubPath[] nearestReachingNeighbors(PointOnNet endPoint, int numberOfNeighbors, int searchLinkLevel, int targetLinkLevel, LODNetworkConstraint constraint, LODGoalNode goalNodeFilter) throws LODNetworkException
Finds the nearest reaching neighbors to the end point.- Parameters:
endPoint
- end point on the networknumberOfNeighbors
- number of neighbors to be returnedsearchLinkLevel
- the preferred link level to search for neighborstargetLinkLevel
- maximum incoming link level of the neighborsconstraint
- network constraintgoalNodeFilter
- goal node implementation- Returns:
- paths from the nearest reaching neighbors to the end point candidates
- Throws:
LODNetworkException
-
nearestReachingNeighbors
public LogicalSubPath[] nearestReachingNeighbors(PointOnNet[] endPoints, int numberOfNeighbors, int searchLinkLevel, int targetLinkLevel, LODNetworkConstraint constraint, LODGoalNode goalNodeFilter) throws LODNetworkException
Finds the nearest reaching neighbors to the end point candidates.- Parameters:
endPoints
- end point candidates on the networknumberOfNeighbors
- number of neighbors to be returnedsearchLinkLevel
- the preferred link level to search for neighborstargetLinkLevel
- maximum incoming link level of the neighborsconstraint
- network constraintgoalNodeFilter
- goal node implementation- Returns:
- paths from the nearest reaching neighbors to the end point candidates
- Throws:
LODNetworkException
-
nearestReachingNeighborsLight
public LogicalLightSubPath[] nearestReachingNeighborsLight(PointOnNet[] endPoints, int numberOfNeighbors, int searchLinkLevel, int targetLinkLevel, LODNetworkConstraint constraint, LODGoalNode goalNodeFilter) throws LODNetworkException
Finds the nearest reaching neighbors to the end point candidates.- Parameters:
endPoints
- end point candidates on the networknumberOfNeighbors
- number of neighbors to be returnedsearchLinkLevel
- the preferred link level to search for neighborstargetLinkLevel
- maximum incoming link level of the neighborsconstraint
- network constraintgoalNodeFilter
- goal node implementation- Returns:
- paths from the nearest reaching neighbors to the end point candidates
- Throws:
LODNetworkException
-
withinCost
public LogicalSubPath[] withinCost(PointOnNet startPoint, double cost, LODNetworkConstraint constraint, LODGoalNode goalNodeFilter) throws LODNetworkException
Finds the nodes within the given cost from the start point. Both the search and the target link levels are set to the lowest link level.- Parameters:
startPoint
- start pointcost
- cost boundconstraint
- network constraintgoalNodeFilter
- goal node implementation- Returns:
- paths to the target nodes from the start point
- Throws:
LODNetworkException
-
withinCost
public LogicalSubPath[] withinCost(PointOnNet startPoint, double cost, int targetLinkLevel, LODNetworkConstraint constraint, LODGoalNode goalNodeFilter) throws LODNetworkException
Finds the nodes within the given cost from the start point. The search uses the lowest link level.- Parameters:
startPoint
- start pointcost
- cost boundtargetLinkLevel
- maximum outgoing link level of the targetsconstraint
- network constraintgoalNodeFilter
- goal node implementation- Returns:
- paths to the target nodes from the start point
- Throws:
LODNetworkException
-
withinCost
public LogicalSubPath[] withinCost(PointOnNet startPoint, double cost, int searchLinkLevel, int targetLinkLevel, LODNetworkConstraint constraint, LODGoalNode goalNodeFilter) throws LODNetworkException
Finds the nodes within the given cost from the start point.- Parameters:
startPoint
- start pointcost
- cost boundsearchLinkLevel
- the link level to search for targetstargetLinkLevel
- maximum outgoing link level of the targetsconstraint
- network constraintgoalNodeFilter
- goal node implementation- Returns:
- paths to the target nodes from the start point
- Throws:
LODNetworkException
-
withinCost
public LogicalSubPath[] withinCost(PointOnNet[] startPoints, double cost, int searchLinkLevel, int targetLinkLevel, LODNetworkConstraint constraint, LODGoalNode goalNodeFilter, boolean returnBoundaryNodesOnly) throws LODNetworkException
Finds the nodes within the given cost from the start point candidates.- Parameters:
startPoints
- start point candidatescost
- cost boundsearchLinkLevel
- the link level to search for targetstargetLinkLevel
- maximum outgoing link level of the targetsconstraint
- network constraintgoalNodeFilter
- goal node implementationreturnBoundaryNodesOnly
- whether to return the boundary nodes only- Returns:
- paths to the target nodes from the start point
- Throws:
LODNetworkException
-
withinCostLight
public LogicalLightSubPath[] withinCostLight(PointOnNet[] startPoints, double cost, int searchLinkLevel, int targetLinkLevel, LODNetworkConstraint constraint, LODGoalNode goalNodeFilter, boolean returnBoundaryNodesOnly) throws LODNetworkException
Finds the nodes within the given cost from the start point candidates.- Parameters:
startPoints
- start point candidatescost
- cost boundsearchLinkLevel
- the link level to search for targetstargetLinkLevel
- maximum outgoing link level of the targetsconstraint
- network constraintgoalNodeFilter
- goal node implementationreturnBoundaryNodesOnly
- whether to return the boundary nodes only- Returns:
- paths to the target nodes from the start point
- Throws:
LODNetworkException
-
withinReachingCost
public LogicalSubPath[] withinReachingCost(PointOnNet endPoint, double cost, LODNetworkConstraint constraint, LODGoalNode goalNodeFilter) throws LODNetworkException
Finds the nodes within the given cost to the end point. Both the search and the target link levels are set to the lowest link level.- Parameters:
endPoint
- end pointcost
- cost boundconstraint
- network constraintgoalNodeFilter
- goal node implementation- Returns:
- paths from the target nodes to the end point
- Throws:
LODNetworkException
-
withinReachingCost
public LogicalSubPath[] withinReachingCost(PointOnNet endPoint, double cost, int targetLinkLevel, LODNetworkConstraint constraint, LODGoalNode goalNodeFilter) throws LODNetworkException
Finds the nodes within the given cost to the end point. The search uses the lowest link level.- Parameters:
endPoint
- end pointcost
- cost boundtargetLinkLevel
- maximum incoming link level of the targetsconstraint
- network constraintgoalNodeFilter
- goal node implementation- Returns:
- paths from the target nodes to the end point
- Throws:
LODNetworkException
-
withinReachingCost
public LogicalSubPath[] withinReachingCost(PointOnNet endPoint, double cost, int searchLinkLevel, int targetLinkLevel, LODNetworkConstraint constraint, LODGoalNode goalNodeFilter) throws LODNetworkException
Finds the nodes within the given cost to the end point.- Parameters:
endPoint
- end pointcost
- cost boundsearchLinkLevel
- the link level to search for targetstargetLinkLevel
- maximum incoming link level of the targetsconstraint
- network constraintgoalNodeFilter
- goal node implementation- Returns:
- paths from the target nodes to the end point
- Throws:
LODNetworkException
-
withinReachingCost
public LogicalSubPath[] withinReachingCost(PointOnNet[] endPoints, double cost, int searchLinkLevel, int targetLinkLevel, LODNetworkConstraint constraint, LODGoalNode goalNodeFilter, boolean returnBoundaryNodesOnly) throws LODNetworkException
Finds the nodes within the given cost to the end point candidates.- Parameters:
endPoints
- end point candidatescost
- cost boundsearchLinkLevel
- the link level to search for targetstargetLinkLevel
- maximum incoming link level of the targetsconstraint
- network constraintgoalNodeFilter
- goal node implementationreturnBoundaryNodesOnly
- whether to return the boundary nodes only- Returns:
- paths from the target nodes to the end point
- Throws:
LODNetworkException
-
withinReachingCostLight
public LogicalLightSubPath[] withinReachingCostLight(PointOnNet[] endPoints, double cost, int searchLinkLevel, int targetLinkLevel, LODNetworkConstraint constraint, LODGoalNode goalNodeFilter, boolean returnBoundaryNodesOnly) throws LODNetworkException
Finds the nodes within the given cost to the end points.- Parameters:
endPoints
- end pointscost
- cost boundsearchLinkLevel
- the link level to search for targetstargetLinkLevel
- maximum incoming link level of the targetsconstraint
- network constraintgoalNodeFilter
- goal node implementationreturnBoundaryNodesOnly
- whether to return the boundary nodes only- Returns:
- paths from the target nodes to the end point
- Throws:
LODNetworkException
-
withinCostInternal
protected LogicalLightSubPath[] withinCostInternal(PointOnNet[] startPoints, double cost, int direction, int searchLinkLevel, int targetLinkLevel, LODNetworkConstraint constraint, LODGoalNode goalNodeFilter, boolean returnFullPath, boolean returnBoundaryNodesOnly) throws LODNetworkException
- Throws:
LODNetworkException
-
withinCostInternalNoReverse
protected LogicalLightSubPath[] withinCostInternalNoReverse(PointOnNet[] startPoints, double cost, int direction, int searchLinkLevel, int targetLinkLevel, LODNetworkConstraint constraint, LODGoalNode goalNodeFilter, boolean returnFullPath, boolean returnBoundaryNodesOnly) throws LODNetworkException
Finds the nodes within the given cost from/to the input points.- Parameters:
startPoints
-cost
-direction
-searchLinkLevel
- preferred link level to search ontargetLinkLevel
- target link levelconstraint
-goalNodeFilter
-returnFullPath
- if true, return full path information; otherwise, omit the node and link IDs in the returned pathreturnBoundaryNodesOnly
- whether to return the boundary nodes only- Returns:
- Throws:
LODNetworkException
-
withinCostOnLinkLevel
protected LogicalLightSubPath[] withinCostOnLinkLevel(PointOnNet[] startPoints, double cost, int direction, int linkLevel, LODNetworkConstraint constraint, LODGoalNode goalNode, boolean returnFullPath, boolean returnBoundaryNodesOnly) throws LODNetworkException
- Throws:
LODNetworkException
-
fastWithinCostPolygon
public JGeometry fastWithinCostPolygon(PointOnNet[] startPoints, double cost, LODNetworkConstraint constraint, LODGoalNode goalNodeFilter) throws LODNetworkException
Returns the polygon covering the nodes, links or partial links that are within the given cost from the start point candidates. X and Y of Node need to be predefined in UserData.- Parameters:
startPoints
- start point candidatescost
- cost rangeconstraint
- network constraintgoalNodeFilter
- goal node filter- Returns:
- Throws:
LODNetworkException
-
fastWithinCostPolygon
public JGeometry fastWithinCostPolygon(PointOnNet[] startPoints, double cost, LODNetworkConstraint constraint, LODGoalNode goalNodeFilter, boolean isLowAccuracy) throws LODNetworkException
Returns the polygon covering the nodes, links or partial links that are within the given cost from the start point candidates. X and Y of Node need to be predefined in UserData.- Parameters:
startPoints
- start point candidatescost
- cost rangeconstraint
- network constraintgoalNodeFilter
- goal node filterisLowAccuracy
- use low accuracy to improve 25% running time within 25% area error when driving cost is small(E.g. less than 1800s)- Returns:
- Throws:
LODNetworkException
-
fastWithinReachingCostPolygon
public JGeometry fastWithinReachingCostPolygon(PointOnNet[] endPoints, double cost, LODNetworkConstraint constraint, LODGoalNode goalNodeFilter) throws LODNetworkException
Returns the polygon covering the nodes, links or partial links that are within the given cost to the end point candidates.- Parameters:
endPoints
- end point candidatescost
- cost rangeconstraint
- network constraintgoalNodeFilter
- goal node filter- Returns:
- Throws:
LODNetworkException
-
fastWithinReachingCostPolygon
public JGeometry fastWithinReachingCostPolygon(PointOnNet[] endPoints, double cost, LODNetworkConstraint constraint, LODGoalNode goalNodeFilter, boolean isLowAccuracy) throws LODNetworkException
Returns the polygon covering the nodes, links or partial links that are within the given cost to the end point candidates.- Parameters:
endPoints
- end point candidatescost
- cost rangeconstraint
- network constraintgoalNodeFilter
- goal node filterisLowAccuracy
- use low accuracy to improve 25% running time within 25% area error when driving cost is small(E.g. less than 1800s)- Returns:
- Throws:
LODNetworkException
-
fastWithinCostPolygonUsingWithinCostNodes
protected JGeometry fastWithinCostPolygonUsingWithinCostNodes(PointOnNet[] startPoints, double cost, int direction, LODNetworkConstraint constraint, LODGoalNode goalNodeFilter, boolean isLowAccuracy) throws LODNetworkException
- Throws:
LODNetworkException
-
fastWithinCostPolygonUsingWithinCostPoints
protected JGeometry fastWithinCostPolygonUsingWithinCostPoints(PointOnNet[] startPoints, double cost, int direction, LODNetworkConstraint constraint, LODGoalNode goalNodeFilter, boolean isLowAccuracy) throws LODNetworkException
- Throws:
LODNetworkException
-
fastWithinCostPolygonUsingNetworkBuffer
protected JGeometry fastWithinCostPolygonUsingNetworkBuffer(PointOnNet[] startPoints, double cost, int direction, LODNetworkConstraint constraint, boolean isLowAccuracy) throws LODNetworkException
- Throws:
LODNetworkException
-
withinCostPolygon
public JGeometry withinCostPolygon(PointOnNet[] startPoints, double cost, LODNetworkConstraint constraint, LODGoalNode goalNodeFilter) throws LODNetworkException
Returns the polygon covering the nodes, links or partial links that are within the given cost from the start point candidates.- Parameters:
startPoints
- start point candidatescost
- cost rangeconstraint
- network constraintgoalNodeFilter
- goal node filter- Returns:
- Throws:
LODNetworkException
-
withinCostPolygon
public JGeometry withinCostPolygon(PointOnNet[] startPoints, double cost, LODNetworkConstraint constraint, LODGoalNode goalNodeFilter, int accuracyLevel) throws LODNetworkException
Returns the polygon covering the nodes, links or partial links that are within the given cost from the start point candidates.- Parameters:
startPoints
- start point candidatescost
- cost rangeconstraint
- network constraintgoalNodeFilter
- goal node filteraccuracyLevel
- Use one of the constants: ACCURACY_LEVEL_LOWEST, ACCURACY_LEVEL_LOW, ACCURACY_LEVEL_MEDIUM, ACCURACY_LEVEL_HIGH, or ACCURACY_LEVEL_HIGHEST.- Returns:
- Throws:
LODNetworkException
-
withinReachingCostPolygon
public JGeometry withinReachingCostPolygon(PointOnNet[] endPoints, double cost, LODNetworkConstraint constraint, LODGoalNode goalNodeFilter) throws LODNetworkException
Returns the polygon covering the nodes, links or partial links that are within the given cost to the end point candidates.- Parameters:
endPoints
- end point candidatescost
- cost rangeconstraint
- network constraintgoalNodeFilter
- goal node filter- Returns:
- Throws:
LODNetworkException
-
withinReachingCostPolygon
public JGeometry withinReachingCostPolygon(PointOnNet[] endPoints, double cost, LODNetworkConstraint constraint, LODGoalNode goalNodeFilter, int accuracyLevel) throws LODNetworkException
Returns the polygon covering the nodes, links or partial links that are within the given cost to the end point candidates.- Parameters:
endPoints
- end point candidatescost
- cost rangeconstraint
- network constraintgoalNodeFilter
- goal node filteraccuracyLevel
- Use one of the constants: ACCURACY_LEVEL_LOWEST, ACCURACY_LEVEL_LOW, ACCURACY_LEVEL_MEDIUM, ACCURACY_LEVEL_HIGH, or ACCURACY_LEVEL_HIGHEST.- Returns:
- Throws:
LODNetworkException
-
withinCostPolygonInternal
protected JGeometry withinCostPolygonInternal(PointOnNet[] startPoints, double cost, int direction, LODNetworkConstraint constraint, LODGoalNode goalNodeFilter) throws LODNetworkException
- Throws:
LODNetworkException
-
withinCostPolygonInternal
protected JGeometry withinCostPolygonInternal(PointOnNet[] startPoints, double cost, boolean considerBoundaryPointsOnly, int direction, LODNetworkConstraint constraint, LODGoalNode goalNodeFilter) throws LODNetworkException
- Throws:
LODNetworkException
-
withinCostPolygonInternal
protected JGeometry withinCostPolygonInternal(PointOnNet[] startPoints, double cost, int direction, LODNetworkConstraint constraint, LODGoalNode goalNodeFilter, int accuracyLevel) throws LODNetworkException
- Throws:
LODNetworkException
-
withinCostPolygonUsingWithinCostNodes
protected JGeometry withinCostPolygonUsingWithinCostNodes(PointOnNet[] startPoints, double cost, int direction, LODNetworkConstraint constraint, LODGoalNode goalNodeFilter, boolean useBoundaryNodesOnly) throws LODNetworkException
- Throws:
LODNetworkException
-
withinCostPolygonUsingWithinCostPoints
protected JGeometry withinCostPolygonUsingWithinCostPoints(PointOnNet[] startPoints, double cost, int direction, LODNetworkConstraint constraint, LODGoalNode goalNodeFilter, boolean useBoundaryPointsOnly) throws LODNetworkException
- Throws:
LODNetworkException
-
withinCostPolygonUsingTraceOutPoints
protected JGeometry withinCostPolygonUsingTraceOutPoints(PointOnNet[] startPoints, double cost, int direction, LODNetworkConstraint constraint, LODGoalNode goalNodeFilter, boolean useBoundaryPointsOnly) throws LODNetworkException
- Throws:
LODNetworkException
-
traceOut
public LogicalSubPath[] traceOut(PointOnNet startPoint, double cost, LODNetworkConstraint constraint, LODGoalNode goalNodeFilter) throws LODNetworkException
Finds the nodes and partial links within the given cost from the start point. Both the search and the target link levels are set to the lowest link level.- Parameters:
startPoint
- start pointcost
- cost boundconstraint
- network constraintgoalNodeFilter
- goal node implementation- Returns:
- paths to the target nodes and links from the start point
- Throws:
LODNetworkException
-
traceOut
public LogicalSubPath[] traceOut(PointOnNet startPoint, double cost, int targetLinkLevel, LODNetworkConstraint constraint, LODGoalNode goalNodeFilter) throws LODNetworkException
Finds the nodes and partial links within the given cost from the start point. The search uses the lowest link level.- Parameters:
startPoint
- start pointcost
- cost boundtargetLinkLevel
- maximum outgoing link level of the targetsconstraint
- network constraintgoalNodeFilter
- goal node implementation- Returns:
- paths to the target nodes and links from the start point
- Throws:
LODNetworkException
-
traceOut
public LogicalSubPath[] traceOut(PointOnNet startPoint, double cost, int searchLinkLevel, int targetLinkLevel, LODNetworkConstraint constraint, LODGoalNode goalNodeFilter) throws LODNetworkException
Finds the nodes and partial links within the given cost from the start point.- Parameters:
startPoint
- start pointcost
- cost boundsearchLinkLevel
- the link level to search ontargetLinkLevel
- maximum outgoing link level of the targetsconstraint
- network constraintgoalNodeFilter
- goal node implementation- Returns:
- paths to the target nodes and links from the start point
- Throws:
LODNetworkException
-
traceOut
public LogicalSubPath[] traceOut(PointOnNet[] startPoints, double cost, int searchLinkLevel, int targetLinkLevel, LODNetworkConstraint constraint, LODGoalNode goalNodeFilter, boolean returnBoundaryPointsOnly) throws LODNetworkException
Finds the nodes and partial links within the given cost from the start point candidates.- Parameters:
startPoints
- start pointscost
- cost boundsearchLinkLevel
- the link level to search ontargetLinkLevel
- maximum outgoing link level of the targetsconstraint
- network constraintgoalNodeFilter
- goal node implementationreturnBoundaryPointsOnly
- whether to return boundary points only- Returns:
- paths to the target nodes and links from the start point candidates
- Throws:
LODNetworkException
-
traceOutLight
public LogicalLightSubPath[] traceOutLight(PointOnNet[] startPoints, double cost, int searchLinkLevel, int targetLinkLevel, LODNetworkConstraint constraint, LODGoalNode goalNodeFilter, boolean returnBoundaryPointsOnly) throws LODNetworkException
Finds the nodes and partial links within the given cost from the start points.- Parameters:
startPoints
- start pointscost
- cost boundsearchLinkLevel
- the link level to search ontargetLinkLevel
- maximum outgoing link level of the targetsconstraint
- network constraintgoalNodeFilter
- goal node implementationreturnBoundaryPointsOnly
- whether to return boundary points only- Returns:
- paths to the target nodes and links from the start point candidates
- Throws:
LODNetworkException
-
traceIn
public LogicalSubPath[] traceIn(PointOnNet endPoint, double cost, LODNetworkConstraint constraint, LODGoalNode goalNodeFilter) throws LODNetworkException
Finds the nodes and partial links within the given cost to the end point. Both the search and the target link levels are set to the lowest link level.- Parameters:
endPoint
- end pointcost
- cost boundconstraint
- network constraintgoalNodeFilter
- goal node implementation- Returns:
- paths from the target nodes and links to the start point
- Throws:
LODNetworkException
-
traceIn
public LogicalSubPath[] traceIn(PointOnNet endPoint, double cost, int targetLinkLevel, LODNetworkConstraint constraint, LODGoalNode goalNodeFilter) throws LODNetworkException
Finds the nodes and partial links within the given cost to the end point. The search uses the lowest link level.- Parameters:
endPoint
- end pointcost
- cost boundtargetLinkLevel
- maximum incoming link level of the targetsconstraint
- network constraintgoalNodeFilter
- goal node implementation- Returns:
- paths from the target nodes and links to the start point
- Throws:
LODNetworkException
-
traceIn
public LogicalSubPath[] traceIn(PointOnNet endPoint, double cost, int searchLinkLevel, int targetLinkLevel, LODNetworkConstraint constraint, LODGoalNode goalNodeFilter) throws LODNetworkException
Finds the nodes and partial links within the given cost to the end point.- Parameters:
endPoint
- end pointcost
- cost boundsearchLinkLevel
- the link level to search ontargetLinkLevel
- maximum incoming link level of the targetsconstraint
- network constraintgoalNodeFilter
- goal node implementation- Returns:
- paths from the target nodes and links to the end point
- Throws:
LODNetworkException
-
traceIn
public LogicalSubPath[] traceIn(PointOnNet[] endPoints, double cost, int searchLinkLevel, int targetLinkLevel, LODNetworkConstraint constraint, LODGoalNode goalNodeFilter, boolean returnBoundaryPointsOnly) throws LODNetworkException
Finds the nodes and partial links within the given cost to the end point candidates.- Parameters:
endPoints
- end point candidatescost
- cost boundsearchLinkLevel
- the link level to search ontargetLinkLevel
- maximum incoming link level of the targetsconstraint
- network constraintgoalNodeFilter
- goal node implementationreturnBoundaryPointsOnly
- whether to return boundary points only- Returns:
- paths from the target nodes and links to the end point candidates
- Throws:
LODNetworkException
-
traceInLight
public LogicalLightSubPath[] traceInLight(PointOnNet[] startPoints, double cost, int searchLinkLevel, int targetLinkLevel, LODNetworkConstraint constraint, LODGoalNode goalNodeFilter, boolean returnBoundaryPointsOnly) throws LODNetworkException
Finds the nodes and partial links within the given cost to the end point candidates.- Parameters:
startPoints
- start point candidatescost
- cost boundsearchLinkLevel
- the link level to search ontargetLinkLevel
- maximum outgoing link level of the targetsconstraint
- network constraintgoalNodeFilter
- goal node implementationreturnBoundaryPointsOnly
- whether to return boundary points only- Returns:
- paths to the target nodes and links from the end point candidates
- Throws:
LODNetworkException
-
traceOutInternal
protected LogicalLightSubPath[] traceOutInternal(PointOnNet[] startPoints, double cost, int direction, int searchLinkLevel, int targetLinkLevel, LODNetworkConstraint constraint, LODGoalNode goalNodeFilter, boolean returnFullPath, boolean returnBoundaryPointsOnly) throws LODNetworkException
- Throws:
LODNetworkException
-
traceOutInternalNoReversePath
protected LogicalLightSubPath[] traceOutInternalNoReversePath(PointOnNet[] startPoints, double cost, int direction, int searchLinkLevel, int targetLinkLevel, LODNetworkConstraint constraint, LODGoalNode goalNodeFilter, boolean returnFullPath, boolean returnBoundaryPointsOnly) throws LODNetworkException
Finds the nodes and partial links within the given cost from/to the start/end point candidates.- Parameters:
startPoints
- start/end point candidatescost
- cost bounddirection
- search directionsearchLinkLevel
- the link level to search ontargetLinkLevel
- maximum outgoing link level of the targetsconstraint
- network constraintgoalNodeFilter
- goal node implementationreturnBoundaryPointsOnly
- whether to return boundary points only- Returns:
- paths to/from the target nodes and links from/to the start/end point candidates
- Throws:
LODNetworkException
-
findConnectedNodes
public OrderedLongSet findConnectedNodes(int searchMethod, long nodeId, int linkLevel, LODNetworkConstraint constraint, LODGoalNode goalNode) throws LODNetworkException
Finds the nodes connected to the given node.- Parameters:
searchMethod
- search method. It can take the following values:- NetworkAnalyst.BREADTH_FIRST_SEARCH, or
- NetworkAnalyst.DEPTH_FIRST_SEARCH.
nodeId
- node IDlinkLevel
- link level to search on- Returns:
- node IDs connected to the given node
- Throws:
LODNetworkException
-
findConnectedNodes
public OrderedLongSet findConnectedNodes(int searchMethod, PointOnNet[] points, int linkLevel, LODNetworkConstraint constraint, LODGoalNode goalNode) throws LODNetworkException
Finds the nodes connected to the given points.- Parameters:
searchMethod
- search method. It can take the following values:- NetworkAnalyst.BREADTH_FIRST_SEARCH, or
- NetworkAnalyst.DEPTH_FIRST_SEARCH.
points
-linkLevel
- link level to search onconstraint
-goalNode
-- Returns:
- Throws:
LODNetworkException
-
findReachableNodes
public OrderedLongSet findReachableNodes(int searchMethod, long startNodeId, int linkLevel, LODNetworkConstraint constraint, LODGoalNode goalNode) throws LODNetworkException
Finds the nodes reachable from the given node.- Parameters:
searchMethod
- search method. It can take the following values:- NetworkAnalyst.BREADTH_FIRST_SEARCH, or
- NetworkAnalyst.DEPTH_FIRST_SEARCH.
startNodeId
- start node IDlinkLevel
- link level to search on- Returns:
- node IDs reachable from the given node ID
- Throws:
LODNetworkException
-
findReachableNodes
public OrderedLongSet findReachableNodes(int searchMethod, PointOnNet[] startPoints, int linkLevel, LODNetworkConstraint constraint, LODGoalNode goalNode) throws LODNetworkException
Finds the nodes reachable from the given points.- Parameters:
searchMethod
- search method. It can take the following values:- NetworkAnalyst.BREADTH_FIRST_SEARCH, or
- NetworkAnalyst.DEPTH_FIRST_SEARCH.
startPoints
- start points- Returns:
- node IDs reachable from the given node
- Throws:
LODNetworkException
-
findReachingNodes
public OrderedLongSet findReachingNodes(int searchMethod, long endNodeId, int linkLevel, LODNetworkConstraint constraint, LODGoalNode goalNode) throws LODNetworkException
Finds the nodes that can reach the given node.- Parameters:
searchMethod
- search method. It can take the following values:- NetworkAnalyst.BREADTH_FIRST_SEARCH, or
- NetworkAnalyst.DEPTH_FIRST_SEARCH.
endNodeId
- end node IDlinkLevel
- maximum link level to search on- Returns:
- node IDs that can reach the given node ID
- Throws:
LODNetworkException
-
findReachingNodes
public OrderedLongSet findReachingNodes(int searchMethod, PointOnNet[] endPoints, int linkLevel, LODNetworkConstraint constraint, LODGoalNode goalNode) throws LODNetworkException
Finds the nodes that can reach the given points.- Parameters:
searchMethod
- search method. It can take the following values:- NetworkAnalyst.BREADTH_FIRST_SEARCH, or
- NetworkAnalyst.DEPTH_FIRST_SEARCH.
endPoints
- end pointslinkLevel
- link level to search on- Returns:
- node IDs that can reach the given node ID
- Throws:
LODNetworkException
-
isReachable
public boolean isReachable(long startNodeId, long endNodeId, int linkLevel, LODNetworkConstraint constraint) throws LODNetworkException
Checks whether there is a path from the start node to the end node using the given link level for long-haul search.- Parameters:
startNodeId
- start node IDendNodeId
- end node IDlinkLevel
- maximum link level to search on- Returns:
- true, if there exists a path from the start node to the end node; false, otherwise.
- Throws:
LODNetworkException
-
isReachable
public boolean isReachable(PointOnNet[] startPoints, PointOnNet[] endPoints, int linkLevel, LODNetworkConstraint constraint) throws LODNetworkException
Checks whether there is a path from the start node to the end node using the given link level for long-haul search.- Parameters:
startPoints
- start pointsendPoints
- end pointslinkLevel
- maximum link level to search on- Returns:
- true, if there exists a path from the start node to the end node; false, otherwise.
- Throws:
LODNetworkException
-
findConnectedComponents
public OrderedLongSet[] findConnectedComponents(int linkLevel) throws LODNetworkException
Finds the connected components for the given link level.- Parameters:
linkLevel
- maximum link level to search on- Returns:
- the connected components
- Throws:
LODNetworkException
-
findConnectedComponentsInPartition
public int findConnectedComponentsInPartition(int partitionId, int linkLevel, int startComponentId, java.util.ArrayList<oracle.spatial.network.lod.AnalysisUtility.NodeComponent> nodeComponentArray) throws LODNetworkException
Find the connected components within a partition, with all the external nodes and boundary links included. This method writes the node id - component id assignment information into the input array, and returns the maximum component ID that has been used so far.- Parameters:
partitionId
- ID of the partition in which the connected component is computedlinkLevel
- link level on which the connected component is computedstartComponentId
- start component ID to be used. All component IDs being assigned to the nodes in the partition must be no smaller than the start component ID.nodeComponentArray
- empty list where the result node ID - component ID pair is written into- Returns:
- the maximum component ID that has been used so far.
- Throws:
LODNetworkException
-
shortestPath
public LogicalSubPath shortestPath(PointOnNet[] startPoints, PointOnNet[] endPoints, LODNetworkConstraint constraint, ShortestPath algorithm) throws LODNetworkException
Finds the shortest path using the input algorithm.- Parameters:
startPoints
- start point candidates on the networkendPoints
- end point on candidates the networkconstraint
- network constraintalgorithm
- shortest path algorithm, such as Dijkstra or A*- Returns:
- shortest path from the start point to the end point
- Throws:
LODNetworkException
-
reverseShortestPath
public LogicalSubPath reverseShortestPath(PointOnNet[] endPoints, PointOnNet[] startPoints, LODNetworkConstraint constraint, ShortestPath algorithm) throws LODNetworkException
Finds the shortest path using the input algorithm, using reverse search direction.- Parameters:
startPoints
- start point candidates on the networkendPoints
- end point on candidates the networkconstraint
- network constraintalgorithm
- shortest path algorithm, such as Dijkstra or A*- Returns:
- shortest path from the start point to the end point
- Throws:
LODNetworkException
-
shortestPathDijkstra
public LogicalSubPath shortestPathDijkstra(PointOnNet startPoint, PointOnNet endPoint, LODNetworkConstraint constraint) throws LODNetworkException
Finds the shortest path on the minimum link level using Dijkstra algorithm.- Parameters:
startPoint
- start point on the networkendPoint
- end point on the networkconstraint
- network constraint- Returns:
- shortest path from the start point to the end point
- Throws:
LODNetworkException
-
shortestPathDijkstraMaxLevel
public LogicalSubPath shortestPathDijkstraMaxLevel(PointOnNet startPoint, PointOnNet endPoint, LODNetworkConstraint constraint) throws LODNetworkException
Finds the shortest path using Dijkstra algorithm where the long-haul path is computed on the maximum link level.- Parameters:
startPoint
- start pointendPoint
- end pointconstraint
- network constraint- Returns:
- shortest path from the start node to the end node
- Throws:
LODNetworkException
-
shortestPathDijkstra
public LogicalSubPath shortestPathDijkstra(PointOnNet startPoint, PointOnNet endPoint, int searchLinkLevel, LODNetworkConstraint constraint) throws LODNetworkException
Finds the shortest path using Dijkstra algorithm where the long-haul path is computed on the given link level.- Parameters:
startPoint
- start point on the networkendPoint
- end point on the networkconstraint
- network constraint- Returns:
- shortest path from the start point to the end point
- Throws:
LODNetworkException
-
shortestPathDijkstra
public LogicalSubPath shortestPathDijkstra(PointOnNet[] startPoints, PointOnNet[] endPoints, int searchLinkLevel, LODNetworkConstraint constraint) throws LODNetworkException
Finds the shortest path using Dijkstra algorithm where the long-haul path is computed on the given link level.- Parameters:
startPoints
- candidate start points on the networkendPoints
- candidate end points on the networkconstraint
- network constraint- Returns:
- shortest path from the start point to the end point
- Throws:
LODNetworkException
-
shortestPathDijkstra
public LogicalSubPath shortestPathDijkstra(PointOnNet[] startPoints, PointOnNet[] endPoints, int searchLinkLevel, int maxHighLevelNodesToConsider, LODNetworkConstraint constraint) throws LODNetworkException
Finds the shortest path using Dijkstra algorithm where the long-haul path is computed on the given link level.- Parameters:
startPoints
- candidate start points on the networkendPoints
- candidate end points on the networkconstraint
- network constraint- Returns:
- shortest path from the start point to the end point
- Throws:
LODNetworkException
-
shortestPathDijkstra
public LogicalSubPath shortestPathDijkstra(PointOnNet[] startPoints, PointOnNet[] endPoints, LODNetworkConstraint constraint, LinkLevelSelector lls) throws LODNetworkException
Finds the shortest path using Dijkstra algorithm with the given link level selector.- Parameters:
startPoints
- candidate start points on the networkendPoints
- candidate end points on the networkconstraint
-lls
-- Returns:
- Throws:
LODNetworkException
-
shortestPathAStar
public LogicalSubPath shortestPathAStar(PointOnNet startPoint, PointOnNet endPoint, LODNetworkConstraint constraint, HeuristicCostFunction hcf, double[] costThresholds) throws LODNetworkException
Finds the shortest path using A* algorithm using dynamic link level selector. The prefered search link level of the dynamic link level selector is set to the maximum link level of the network.- Parameters:
startPoint
- start point on the networkendPoint
- end point on the networkconstraint
- network constrainthcf
- Heuristic cost function implementation- Returns:
- shortest path from the start point to the end point
- Throws:
LODNetworkException
-
shortestPathAStar
public LogicalSubPath shortestPathAStar(PointOnNet startPoint, PointOnNet endPoint, int searchLinkLevel, LODNetworkConstraint constraint, HeuristicCostFunction hcf, double[] costThresholds) throws LODNetworkException
Finds the shortest path using A* algorithm with dynamic link level selector.- Parameters:
startPoint
- start point on the networkendPoint
- end point on the networksearchLinkLevel
- prefered link level to compute long-haul pathconstraint
- network constrainthcf
- Heuristic cost function implementation- Returns:
- shortest path from the start point to the end point
- Throws:
LODNetworkException
-
shortestPathAStar
public LogicalSubPath shortestPathAStar(PointOnNet startPoint, PointOnNet endPoint, LODNetworkConstraint constraint, HeuristicCostFunction hcf, LinkLevelSelector lls) throws LODNetworkException
Finds the shortest path using A* algorithm.- Parameters:
startPoint
- start point on the networkendPoint
- end point on the networkconstraint
- network constrainthcf
- Heuristic cost function implementationlls
- link level selector to be used in A* algorithm- Returns:
- shortest path from the start point to the end point
- Throws:
LODNetworkException
-
shortestPathAStar
public LogicalSubPath shortestPathAStar(PointOnNet[] startPoints, PointOnNet[] endPoints, LODNetworkConstraint constraint, HeuristicCostFunction hcf, LinkLevelSelector lls) throws LODNetworkException
Finds the shortest path using A* algorithm.- Parameters:
startPoints
- start point candidates on the networkendPoints
- end point on candidates the networkconstraint
- network constrainthcf
- Heuristic cost function implementationlls
- link level selector to be used in A* algorithm- Returns:
- shortest path from the start point to the end point
- Throws:
LODNetworkException
-
shortestPathHierarchical
public LogicalSubPath shortestPathHierarchical(PointOnNet[] startPoints, PointOnNet[] endPoints, int searchLinkLevel, int maxHighLevelNodesToConsider, LODNetworkConstraint constraint, ShortestPath algorithm) throws LODNetworkException
Finds the shortest path from the start point candidates to the end point candidates. This method takes advantage of multi-leveled network, by routing the start/end points to the nearest higher level network, and then navigate on the higher level network only.- Parameters:
startPoints
- start point candidates on the networkendPoints
- end point candidates on the networkmaxHighLevelNodesToConsider
- maximum high level nodes to considerconstraint
- network constraintalgorithm
- basic single-level shortest path algorithm, such as Dijkstra or A*.- Returns:
- shortest path from the start point candidates to the end point candidates
- Throws:
LODNetworkException
-
mst
public SpanningTree mst(int linkLevel, LODNetworkConstraint constraint) throws LODNetworkException
Returns the minimum-spanning-tree for the network on the given link level.- Parameters:
linkLevel
- link level- Returns:
- the minimum-spanning-tree
- Throws:
LODNetworkException
-
mst
public SpanningTree mst(int linkLevel, LODNetworkConstraint constraint, MinimumSpanningTree algorithm) throws LODNetworkException
Returns the minimum-spanning-tree for the network on the given link level.- Parameters:
linkLevel
-constraint
-algorithm
-- Returns:
- Throws:
LODNetworkException
-
mcst
public long[] mcst(int linkLevel, LODNetworkConstraint constraint) throws LODNetworkException
Deprecated.Returns the link IDs of the minimum-spanning-tree.- Parameters:
linkLevel
- link level- Returns:
- link IDs of the minimum-spanning-tree
- Throws:
LODNetworkException
-
mcst
public long[] mcst(int linkLevel, LODNetworkConstraint constraint, NetworkUpdate tmpNetworkUpdate) throws LODNetworkException
Deprecated.Returns the link IDs of the minimum-spanning-tree.- Parameters:
linkLevel
- link leveltmpNetworkUpdate
- temporary network update. This parameter is ignored. Please use the setNetworkUpdates(...) method to set dynamic network updates instead.- Returns:
- link IDs of the minimum-spanning-tree
- Throws:
LODNetworkException
-
tsp
public TspPath tsp(PointOnNet[][] pointsToVisit, TSP.TourFlag tourFlag, int linkLevel, LODNetworkConstraint constraint) throws LODNetworkException
Returns the traveling salesman tour covering the given points.- Parameters:
pointsToVisit
- points to visit on the tourtourFlag
- a flag indicating whether the tour should be open or closed, and if the tour is open, whether the tour should have fixed start or end point.constraint
- network constraint- Returns:
- traveling salesman tour
- Throws:
LODNetworkException
-
tsp
public TspPath tsp(PointOnNet[][] pointsToVisit, TSP.TourFlag tourFlag, int linkLevel, LODNetworkConstraint constraint, TSP algorithm) throws LODNetworkException
Returns the traveling salesman tour covering the input points.- Parameters:
pointsToVisit
- points to visit on the tour.tourFlag
- a flag indicating whether the tour should be open or closed, and if the tour is open, whether the tour should have fixed start or end point.constraint
- network constraintalgorithm
- tsp algorithm- Returns:
- traveling salesman tour
- Throws:
LODNetworkException
-
tsp
public TspPath tsp(PointOnNet[][] pointsToVisit, TSP.TourFlag tourFlag, LODNetworkConstraint networkConstraint) throws LODNetworkException
Returns the traveling salesman tour covering the input points.- Parameters:
pointsToVisit
- points to visit on the tourtourFlag
- a flag indicating whether the tour should be open or closed, and if the tour is open, whether the tour should have fixed start or end point.networkConstraint
- network constraint- Returns:
- traveling salesman tour
- Throws:
LODNetworkException
-
tsp
public TspPath tsp(PointOnNet[][] pointsToVisit, TSP.TourFlag tourFlag, LODNetworkConstraint networkConstraint, TspConstraint tspConstraint) throws LODNetworkException
Returns the traveling salesman tour covering the input points.- Parameters:
pointsToVisit
- points to visit on the tourtourFlag
- a flag indicating whether the tour should be open or closed, and if the tour is open, whether the tour should have fixed start or end point.networkConstraint
- network constrainttspConstraint
- TSP constraint- Returns:
- traveling salesman tour
- Throws:
LODNetworkException
-
tsp
public TspPath tsp(PointOnNet[][] pointsToVisit, TSP.TourFlag tourFlag, LODNetworkConstraint networkConstraint, TSP algorithm) throws LODNetworkException
Returns the traveling salesman tour covering the input points.- Parameters:
pointsToVisit
- points to visit on the tour.tourFlag
- a flag indicating whether the tour should be open or closed, and if the tour is open, whether the tour should have fixed start or end point.networkConstraint
- network constraintalgorithm
- tsp algorithm- Returns:
- traveling salesman tour
- Throws:
LODNetworkException
-
tsp
public TspPath tsp(PointOnNet[][] pointsToVisit, TSP.TourFlag tourFlag, LODNetworkConstraint networkConstraint, TspConstraint tspConstraint, TSP algorithm) throws LODNetworkException
Returns the traveling salesman tour covering the input points.- Parameters:
pointsToVisit
- points to visit on the tour.tourFlag
- a flag indicating whether the tour should be open or closed, and if the tour is open, whether the tour should have fixed start or end point.networkConstraint
- network constraintalgorithm
- tsp algorithm- Returns:
- traveling salesman tour
- Throws:
LODNetworkException
-
kShortestPaths
public LogicalSubPath[] kShortestPaths(PointOnNet[] startPoint, PointOnNet[] endPoint, int k, LODNetworkConstraint constraint) throws LODNetworkException
Returns K shortest loopless paths from the start point candidates to the end point candidates.- Parameters:
startPoint
- start point candidatesendPoint
- end point candidatesk
- number of loopless paths to be returnedconstraint
- network constraint- Returns:
- K shortest loopless paths from the start point to the end point
- Throws:
LODNetworkException
-
kShortestPathsBfs
public LogicalSubPath[] kShortestPathsBfs(PointOnNet[] startPoint, PointOnNet[] endPoint, int k, double maxToMinBound, long timeout, LODNetworkConstraint constraint, PathFilter pathFilter) throws LODNetworkException
Returns K shortest loopless paths from the start point candidates to the end point candidates.- Parameters:
startPoint
- start point candidatesendPoint
- end point candidatesk
- number of loopless paths to be returnedconstraint
- network constraint- Returns:
- K shortest loopless paths from the start point to the end point
- Throws:
LODNetworkException
-
kShortestPathsDijkstra
public LogicalSubPath[] kShortestPathsDijkstra(PointOnNet[] startPoint, PointOnNet[] endPoint, int k, double maxToMinBound, long timeout, LODNetworkConstraint constraint, PathFilter pathFilter) throws LODNetworkException
Returns K shortest paths from the start point candidates to the end point candidates.- Parameters:
startPoint
- start point candidatesendPoint
- end point candidatesk
- number of loopless paths to be returnedconstraint
- network constraint- Returns:
- K shortest loopless paths from the start point to the end point
- Throws:
LODNetworkException
-
reverseKShortestPathsBfs
public LogicalSubPath[] reverseKShortestPathsBfs(PointOnNet[] startPoint, PointOnNet[] endPoint, int k, double maxToMinBound, long timeout, LODNetworkConstraint constraint, PathFilter pathFilter) throws LODNetworkException
Returns K shortest loopless paths from the start point candidates to the end point candidates.- Parameters:
startPoint
- start point candidatesendPoint
- end point candidatesk
- number of loopless paths to be returnedconstraint
- network constraint- Returns:
- K shortest loopless paths from the start point to the end point
- Throws:
LODNetworkException
-
reverseKShortestPathsDijkstra
public LogicalSubPath[] reverseKShortestPathsDijkstra(PointOnNet[] startPoint, PointOnNet[] endPoint, int k, double maxToMinBound, long timeout, LODNetworkConstraint constraint, PathFilter pathFilter) throws LODNetworkException
Returns K shortest loopless paths from the start point candidates to the end point candidates.- Parameters:
startPoint
- start point candidatesendPoint
- end point candidatesk
- number of loopless paths to be returnedconstraint
- network constraint- Returns:
- K shortest loopless paths from the start point to the end point
- Throws:
LODNetworkException
-
kShortestPaths
public LogicalSubPath[] kShortestPaths(PointOnNet[] startPoint, PointOnNet[] endPoint, int k, LODNetworkConstraint constraint, KShortestPaths kspAlgorithm) throws LODNetworkException
Returns K shortest loopless paths from the start point candiates to the end point candidates.- Parameters:
startPoint
- start point candidatesendPoint
- end point candidatesk
- number of loopless paths to be returnedconstraint
- network constraintkspAlgorithm
- K-shortest paths algorithm- Returns:
- K shortest loopless paths from the start point to the end point
- Throws:
LODNetworkException
-
kShortestPaths
public LogicalSubPath[] kShortestPaths(PointOnNet[] startPoint, PointOnNet[] endPoint, int k, LODNetworkConstraint constraint, PathFilter pathFilter, KShortestPaths kspAlgorithm) throws LODNetworkException
- Throws:
LODNetworkException
-
reverseKShortestPaths
public LogicalSubPath[] reverseKShortestPaths(PointOnNet[] endPoint, PointOnNet[] startPoint, int k, LODNetworkConstraint constraint) throws LODNetworkException
Returns K shortest loopless paths from the start point candidates to the end point candidates, using reverse search direction.- Parameters:
startPoint
- start point candidatesendPoint
- end point candidatesk
- number of loopless paths to be returnedconstraint
- network constraint- Returns:
- K shortest loopless paths from the start point to the end point
- Throws:
LODNetworkException
-
reverseKShortestPaths
public LogicalSubPath[] reverseKShortestPaths(PointOnNet[] endPoint, PointOnNet[] startPoint, int k, LODNetworkConstraint constraint, KShortestPaths kspAlgorithm) throws LODNetworkException
Returns reverse K shortest loopless paths from the start point candiates to the end point candidates, using reverse search direction.- Parameters:
startPoint
- start point candidatesendPoint
- end point candidatesk
- number of loopless paths to be returnedconstraint
- network constraintkspAlgorithm
- K-shortest paths algorithm- Returns:
- K shortest loopless paths from the start point to the end point
- Throws:
LODNetworkException
-
reverseKShortestPaths
public LogicalSubPath[] reverseKShortestPaths(PointOnNet[] endPoint, PointOnNet[] startPoint, int k, LODNetworkConstraint constraint, PathFilter pathFilter, KShortestPaths kspAlgorithm) throws LODNetworkException
- Throws:
LODNetworkException
-
networkBuffer
public NetworkBuffer networkBuffer(PointOnNet[] startPoints, double cost, LODNetworkConstraint constraint) throws LODNetworkException
Computes network buffer within the given cost from the start point candidates.- Parameters:
startPoints
- start point candidatescost
- cost range of the network bufferconstraint
- network constraint- Returns:
- network buffer within the given cost from the start point candidates
- Throws:
LODNetworkException
-
reachingNetworkBuffer
public NetworkBuffer reachingNetworkBuffer(PointOnNet[] endPoints, double cost, LODNetworkConstraint constraint) throws LODNetworkException
Computes network buffer within the given cost to the end point candidates.- Parameters:
endPoints
- end point candidatescost
- cost range of the network bufferconstraint
- network constraint- Returns:
- network buffer within the given cost to the end point candidates
- Throws:
LODNetworkException
-
allDetourShortestPathsWithCostLimit
public LogicalSubPath[] allDetourShortestPathsWithCostLimit(PointOnNet[] startPoints, PointOnNet[] endPoints, double maxCost, LODNetworkConstraint constraint) throws LODNetworkException
Finds all paths from the start points to the end points with the following properties:- The cost of the path is smaller than or equal to the given cost bound
- The subpath from the start points to any intermediate node on the path is the shortest possible path from the start points to that node.
- The subpath from any intermediate node to the end points is the shortest possible path from that node to the end points.
- Parameters:
startPoints
- start point candidatesendPoints
- end point candidatesmaxCost
- cost boundconstraint
- network constraint- Returns:
- Throws:
LODNetworkException
-
allDetourShortestPathsWithDepthLimit
public LogicalSubPath[] allDetourShortestPathsWithDepthLimit(PointOnNet[] startPoints, PointOnNet[] endPoints, int maxDepth, LODNetworkConstraint constraint) throws LODNetworkException
Finds all paths from the start points to the end points with the following properties:- The depth of the path is smaller than or equal to the given depth bound
- The subpath from the start points to any intermediate node on the path is the shortest possible path from the start points to that node.
- The subpath from any intermediate node to the end points is the shortest possible path from that node to the end points.
- Parameters:
startPoints
- start point candidatesendPoints
- end point candidatesmaxDepth
- depth boundconstraint
- network constraint- Returns:
- Throws:
LODNetworkException
-
shortestPath
public PathFeature shortestPath(Feature[] start, Feature[] end, LODNetworkConstraint constraint, ShortestPath algorithm) throws LODNetworkException
Finds the shortest path from the start feature candidates to the end feature candidates. The start feature candidates and the end feature candidates can belong to different feature layers. If there are more than one start or end feature candidates, it returns the shortest path among all candidate paths.- Parameters:
start
- start feature candidatesend
- end feature candidatesconstraint
- network constraintalgorithm
- shortest path algorithm- Returns:
- a PathFeature object representing the shortest path from the start feature(s) to the end feature(s).
- Throws:
LODNetworkException
-
shortestPathAStar
public PathFeature shortestPathAStar(Feature[] start, Feature[] end, LODNetworkConstraint constraint, HeuristicCostFunction hcf, LinkLevelSelector lls) throws LODNetworkException
Finds the shortest path from the start feature candidates to the end feature candidates. The start feature candidates and the end feature candidates can belong to different feature layers. If there are more than one start or end feature candidates, it returns the shortest path among all candidate paths.- Parameters:
start
- start feature candidatesend
- end feature candidatesconstraint
- network constrainthcf
- heuristic cost functionlls
- link level selector- Returns:
- a PathFeature object representing the shortest path from the start feature(s) to the end feature(s).
- Throws:
LODNetworkException
-
shortestPathDijkstra
public PathFeature shortestPathDijkstra(Feature[] start, Feature[] end, LODNetworkConstraint constraint, LinkLevelSelector lls) throws LODNetworkException
Finds the shortest path from the start feature candidates to the end feature candidates. The start feature candidates and the end feature candidates can belong to different feature layers. If there are more than one start or end feature candidates, it returns the shortest path among all candidate paths.- Parameters:
start
- start feature candidatesend
- end feature candidatesconstraint
- network constraintlls
- link level selector- Returns:
- a PathFeature object representing the shortest path from the start feature(s) to the end feature(s).
- Throws:
LODNetworkException
-
kShortestPaths
public PathFeature[] kShortestPaths(Feature[] start, Feature[] end, int k, LODNetworkConstraint constraint, KShortestPaths algorithm) throws LODNetworkException
Finds the top k shortest paths from the start feature candidates to the end feature candidates. The start feature candidates and the end feature candidates can belong to different feature layers. If there are more than one start or end feature candidates, it returns the top k shortest paths among all candidate paths.- Parameters:
start
- start feature candidatesend
- end feature candidatesk
- number of paths to returnconstraint
- network constraintalgorithm
- shortest path algorithm- Returns:
- a PathFeature object representing the shortest path from the start feature(s) to the end feature(s).
- Throws:
LODNetworkException
-
reverseKShortestPaths
public PathFeature[] reverseKShortestPaths(Feature[] end, Feature[] start, int k, LODNetworkConstraint constraint, KShortestPaths algorithm) throws LODNetworkException
Finds the top k shortest paths from the start feature candidates to the end feature candidates, using reverse search direction. The start feature candidates and the end feature candidates can belong to different feature layers. If there are more than one start or end feature candidates, it returns the top k shortest paths among all candidate paths.- Parameters:
end
- end feature candidatesstart
- start feature candidatesk
- number of paths to returnconstraint
- network constraintalgorithm
- shortest path algorithm- Returns:
- a PathFeature object representing the shortest path from the start feature(s) to the end feature(s).
- Throws:
LODNetworkException
-
reverseShortestPath
public PathFeature reverseShortestPath(Feature[] end, Feature[] start, LODNetworkConstraint constraint, ShortestPath algorithm) throws LODNetworkException
Finds the shortest path from the start feature candidates to the end feature candidates, using reverse search direction. The start feature candidates and the end feature candidates can belong to different feature layers. If there are more than one start or end feature candidates, it returns the shortest path among all candidate paths.- Parameters:
start
- start feature candidatesend
- end feature candidatesconstraint
- network constraintalgorithm
- shortest path algorithm- Returns:
- a PathFeature object representing the shortest path from the start feature(s) to the end feature(s).
- Throws:
LODNetworkException
-
nearestPoints
public PathToPoint[] nearestPoints(PointOnNet[] startPoints, PointOnNet[][] targetPoints, int k, LODNetworkConstraint constraint, boolean returnFullPath) throws LODNetworkException
Returns the top k nearest target points from the start points.- Parameters:
startPoints
- start point candidatestargetPoints
- target points to choose fromk
- number of points to be returnedconstraint
-returnFullPath
- whether to return full paths to the target points or the light weight paths.- Returns:
- The top k nearest points among the specified target points and the paths to those points.
- Throws:
LODNetworkException
-
nearestReachingPoints
public PathToPoint[] nearestReachingPoints(PointOnNet[] startPoints, PointOnNet[][] targetPoints, int k, LODNetworkConstraint constraint, boolean returnFullPath) throws LODNetworkException
Returns the top k nearest reaching target points to the start points.- Parameters:
startPoints
- start point candidatestargetPoints
- target points to choose fromk
- number of points to be returnedconstraint
-returnFullPath
- whether to return full paths to the target points or the light weight paths.- Returns:
- The top k nearest points among the specified target points and the paths to those points.
- Throws:
LODNetworkException
-
withinCostPoints
public PathToPoint[] withinCostPoints(PointOnNet[] startPoints, PointOnNet[][] targetPoints, double cost, LODNetworkConstraint constraint, boolean returnFullPath) throws LODNetworkException
- Throws:
LODNetworkException
-
withinReachingCostPoints
public PathToPoint[] withinReachingCostPoints(PointOnNet[] startPoints, PointOnNet[][] targetPoints, double cost, LODNetworkConstraint constraint, boolean returnFullPath) throws LODNetworkException
- Throws:
LODNetworkException
-
nearestFeatures
public FeaturePath[] nearestFeatures(Feature[] start, int numberOfFeatures, int[] featureLayerIds, LODNetworkConstraint constraint, FeatureFilter featureFilter) throws LODNetworkException
Finds the nearest features from the start feature candidates. If there are more than one start feature candidates, it returns the nearest features to any of the start features.- Parameters:
start
- start feature candidatesnumberOfFeatures
- number of features to returnfeatureLayerIds
- feature layer IDsconstraint
- network constraint- Returns:
- PathFeature objects representing the shortest paths from a start feature to the nearest neighbors.
- Throws:
LODNetworkException
-
nearestFeatures
public FeaturePath[] nearestFeatures(PointOnNet[] startPoints, int numberOfFeatures, int[] featureLayerIds, LODNetworkConstraint constraint, FeatureFilter featureFilter) throws LODNetworkException
Finds the nearest features from the start point candidates. If there are more than one start point candidates, it returns the nearest features from any of the start points.- Parameters:
startPoints
- start point candidatesnumberOfFeatures
- number of features to returnfeatureLayerIds
- feature layer IDsconstraint
- network constraint- Returns:
- PathFeature objects representing the shortest paths from a start point to the nearest neighbors.
- Throws:
LODNetworkException
-
nearestReachingFeatures
public FeaturePath[] nearestReachingFeatures(Feature[] end, int numberOfFeatures, int[] featureLayerIds, LODNetworkConstraint constraint, FeatureFilter featureFilter) throws LODNetworkException
Finds the nearest reaching features to the end feature candidates. If there are more than one end feature candidates, it returns the nearest features to any of the end features.- Parameters:
end
- end feature candidatesnumberOfFeatures
- number of features to returnfeatureLayerIds
- feature layer IDsconstraint
- network constraint- Returns:
- PathFeature objects representing the shortest paths from the nearest neighbors to an end feature.
- Throws:
LODNetworkException
-
nearestReachingFeatures
public FeaturePath[] nearestReachingFeatures(PointOnNet[] endPoints, int numberOfFeatures, int[] featureLayerIds, LODNetworkConstraint constraint, FeatureFilter featureFilter) throws LODNetworkException
Finds the nearest reaching features to the end point candidates. If there are more than one end point candidates, it returns the nearest features to any of the end points.- Parameters:
endPoints
- end point candidatesnumberOfFeatures
- number of features to returnfeatureLayerIds
- feature layer IDsconstraint
- network constraint- Returns:
- PathFeature objects representing the shortest paths from the nearest neighbors to an end points.
- Throws:
LODNetworkException
-
withinCostFeatures
public FeaturePath[] withinCostFeatures(Feature[] start, double cost, int[] featureLayerIds, LODNetworkConstraint constraint, FeatureFilter featureFilter) throws LODNetworkException
Finds features within the given cost from the start features.- Parameters:
start
- start feature candidatescost
- cost rangefeatureLayerIds
- feature layer IDsconstraint
- network constraint- Returns:
- PathFeature objects representing the shortest paths from a start feature to the features within the given cost.
- Throws:
LODNetworkException
-
withinCostFeatures
public FeaturePath[] withinCostFeatures(PointOnNet[] startPoints, double cost, int[] featureLayerIds, LODNetworkConstraint constraint, FeatureFilter featureFilter) throws LODNetworkException
Finds features within the given cost from the start features.- Parameters:
startPoints
- start point candidatescost
- cost rangefeatureLayerIds
- feature layer IDsconstraint
- network constraint- Returns:
- PathFeature objects representing the shortest paths from a start point to the features within the given cost.
- Throws:
LODNetworkException
-
withinReachingCostFeatures
public FeaturePath[] withinReachingCostFeatures(Feature[] endFeatures, double cost, int[] featureLayerIds, LODNetworkConstraint constraint, FeatureFilter featureFilter) throws LODNetworkException
Finds features within the given cost to the end features.- Parameters:
endFeatures
- end feature candidatescost
- cost rangefeatureLayerIds
- feature layer IDsconstraint
- network constraint- Returns:
- PathFeature objects representing the shortest paths from the features within the given cost to an end feature.
- Throws:
LODNetworkException
-
withinReachingCostFeatures
public FeaturePath[] withinReachingCostFeatures(PointOnNet[] endPoints, double cost, int[] featureLayerIds, LODNetworkConstraint constraint, FeatureFilter featureFilter) throws LODNetworkException
Finds features within the given cost to the end features.- Parameters:
endPoints
- end point candidatescost
- cost rangefeatureLayerIds
- feature layer IDsconstraint
- network constraint- Returns:
- PathFeature objects representing the shortest paths from the features within the given cost to an end point.
- Throws:
LODNetworkException
-
withinCostPolygon
public JGeometry withinCostPolygon(Feature[] startFeatures, double cost, LODNetworkConstraint constraint, LODGoalNode goalNodeFilter) throws LODNetworkException
Returns the polygon covering the nodes, links or partial links that are within the given cost from the start feature candidates.- Parameters:
startFeatures
- start feature candidatescost
- cost rangeconstraint
- network constraintgoalNodeFilter
- goal node filter- Returns:
- Throws:
LODNetworkException
-
withinReachingCostPolygon
public JGeometry withinReachingCostPolygon(Feature[] endFeatures, double cost, LODNetworkConstraint constraint, LODGoalNode goalNodeFilter) throws LODNetworkException
Returns the polygon covering the nodes, links or partial links that are within the given cost to the end feature candidates.- Parameters:
endFeatures
- end feature candidatescost
- cost rangeconstraint
- network constraintgoalNodeFilter
- goal node filter- Returns:
- Throws:
LODNetworkException
-
tsp
public TspPathFeature tsp(Feature[][] featuresToVisit, TSP.TourFlag tourFlag, LODNetworkConstraint constraint, TSP algorithm) throws LODNetworkException
Returns the traveling salesman tour covering the input features.- Parameters:
featuresToVisit
- features to visit on the tour.tourFlag
- a flag indicating whether the tour should be open or closed, and if the tour is open, whether the tour should have fixed start or end point.constraint
- network constraintalgorithm
- tsp algorithm- Returns:
- traveling salesman tour
- Throws:
LODNetworkException
-
tsp
public TspPathFeature tsp(Feature[][] featuresToVisit, TSP.TourFlag tourFlag, LODNetworkConstraint networkConstraint, TspConstraint tspConstraint, TSP algorithm) throws LODNetworkException
Returns the traveling salesman tour covering the input features.- Parameters:
featuresToVisit
- features to visit on the tour.tourFlag
- a flag indicating whether the tour should be open or closed, and if the tour is open, whether the tour should have fixed start or end point.networkConstraint
- network constrainttspConstraint
- tsp constraintalgorithm
- tsp algorithm- Returns:
- traveling salesman tour
- Throws:
LODNetworkException
-
isReachable
public boolean isReachable(Feature[] start, Feature[] end, int linkLevel, LODNetworkConstraint constraint) throws LODNetworkException
Checks whether there is a path from the start features to the end features using the given link level for long-haul search.- Parameters:
start
- start feature candidatesend
- end feature candidateslinkLevel
- maximum link level to search on- Returns:
- true, if there exists a path from the start features to the end features; false, otherwise.
- Throws:
LODNetworkException
-
findReachableFeatures
public Feature[] findReachableFeatures(int searchMethod, PointOnNet[] startPoints, int linkLevel, int[] featureLayerIds, LODNetworkConstraint constraint, FeatureFilter featureFilter) throws LODNetworkException
Finds the nodes reachable from the given node.- Parameters:
searchMethod
- search method. It can take the following values:- NetworkAnalyst.BREADTH_FIRST_SEARCH, or
- NetworkAnalyst.DEPTH_FIRST_SEARCH.
startPoints
- start points- Returns:
- node IDs reachable from the given node
- Throws:
LODNetworkException
-
findReachingFeatures
public Feature[] findReachingFeatures(int searchMethod, PointOnNet[] startPoints, int linkLevel, int[] featureLayerIds, LODNetworkConstraint constraint, FeatureFilter featureFilter) throws LODNetworkException
Finds the nodes that can reach the given node.- Parameters:
searchMethod
- search method. It can take the following values:- NetworkAnalyst.BREADTH_FIRST_SEARCH, or
- NetworkAnalyst.DEPTH_FIRST_SEARCH.
startPoints
- start points- Returns:
- node IDs reachable from the given node
- Throws:
LODNetworkException
-
bisectClustering
public ClusterResult bisectClustering(PointOnNet[] points, int numClusters, int userDataCategory, int xCoordUserDataIndex, int yCoordUserDataIndex, int geometryUserDataIndex) throws LODNetworkException
- Throws:
LODNetworkException
-
kMeansClustering
public ClusterResult kMeansClustering(PointOnNet[] points, int numClusters, int maxSize, int minSize, int userDataCategory, int xCoordUserDataIndex, int yCoordUserDataIndex, int geometryUserDataIndex) throws LODNetworkException
- Throws:
LODNetworkException
-
vrpNoDepot
public TspPath[] vrpNoDepot(PointOnNet[][] points, int numVehicles, LODNetworkConstraint networkConstraint, TspConstraint tspConstraint, VRP vrpAlgo) throws LODNetworkException
- Throws:
LODNetworkException
-
vrpSingleDepot
public TspPath[] vrpSingleDepot(PointOnNet[][] points, int numVehicles, PointOnNet[] depot, LODNetworkConstraint networkConstraint, TspConstraint tspConstraint, VRP vrpAlgo) throws LODNetworkException
- Throws:
LODNetworkException
-
vrpNoDepot
public TspPath[] vrpNoDepot(PointOnNet[][] points, int numVehicles, LODNetworkConstraint networkConstraint, TspConstraint tspConstraint, int userDataCategory, int xUserDataIndex, int yUserDataIndex, int geometryUserDataIndex) throws LODNetworkException
- Throws:
LODNetworkException
-
vrpSingleDepot
public TspPath[] vrpSingleDepot(PointOnNet[][] points, int numVehicles, PointOnNet[] depot, LODNetworkConstraint networkConstraint, TspConstraint tspConstraint, int userDataCategory, int xUserDataIndex, int yUserDataIndex, int geometryUserDataIndex) throws LODNetworkException
- Throws:
LODNetworkException
-
-