Class EdgeElevationInterpolator
Since inner nodes of tunnel or bridge do not lie on the Earth surface, we should not use elevations returned by the elevation provider for these points. Instead, we'll estimate elevations of these points based on elevations of entry/exit nodes of the tunnel/bridge.
To do this, we'll iterate over the graph looking for tunnel or bridge edges
using isInterpolatableEdge(EdgeIteratorState)
. Once such an edge is
found, we'll calculate a connected component of tunnel/bridge edges starting
from the base node of this edge, using simple BreadthFirstSearch
.
Nodes which only have interpolatabe edges connected to them are inner nodes
and are considered to not lie on the Earth surface. Nodes which also have
non-interpolatable edges are outer nodes and are considered to lie on the
Earth surface. Elevations of inner nodes are then interpolated from the outer
nodes using NodeElevationInterpolator
. Elevations of pillar nodes are
calculated using linear interpolation on distances from tower nodes.
- Author:
- Alexey Valikov
-
Field Summary
Fields -
Constructor Summary
ConstructorsConstructorDescriptionEdgeElevationInterpolator
(BaseGraph graph, EnumEncodedValue<RoadEnvironment> roadEnvironmentEnc, RoadEnvironment interpolateKey) -
Method Summary
Modifier and TypeMethodDescriptionvoid
execute()
void
gatherOuterAndInnerNodeIds
(EdgeExplorer edgeExplorer, EdgeIteratorState interpolatableEdge, GHBitSet visitedEdgesIds, com.carrotsearch.hppc.IntSet outerNodeIds, GHIntHashSet innerNodeIds) getGraph()
protected boolean
-
Field Details
-
roadEnvironmentEnc
-
-
Constructor Details
-
EdgeElevationInterpolator
public EdgeElevationInterpolator(BaseGraph graph, EnumEncodedValue<RoadEnvironment> roadEnvironmentEnc, RoadEnvironment interpolateKey)
-
-
Method Details
-
isInterpolatableEdge
-
getGraph
-
execute
public void execute() -
gatherOuterAndInnerNodeIds
public void gatherOuterAndInnerNodeIds(EdgeExplorer edgeExplorer, EdgeIteratorState interpolatableEdge, GHBitSet visitedEdgesIds, com.carrotsearch.hppc.IntSet outerNodeIds, GHIntHashSet innerNodeIds)
-