Class QueryRoutingCHGraph
java.lang.Object
com.graphhopper.routing.querygraph.QueryRoutingCHGraph
- All Implemented Interfaces:
RoutingCHGraph
This class is used to allow routing between virtual nodes (snapped coordinates that lie between the nodes of the
original graph) when using CH. To use it first create a
QueryGraph
just as if you were not using CH and then
create an instance of the present class on top of this.-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoid
close()
Traverses the base edges and shortcuts at a given node.getEdgeIteratorState
(int chEdge, int adjNode) int
getEdges()
int
getLevel
(int node) int
getNodes()
int
double
getTurnWeight
(int inEdge, int viaNode, int outEdge) boolean
boolean
-
Constructor Details
-
QueryRoutingCHGraph
-
-
Method Details
-
getNodes
public int getNodes()- Specified by:
getNodes
in interfaceRoutingCHGraph
-
getEdges
public int getEdges()- Specified by:
getEdges
in interfaceRoutingCHGraph
-
getShortcuts
public int getShortcuts()- Specified by:
getShortcuts
in interfaceRoutingCHGraph
-
createInEdgeExplorer
Description copied from interface:RoutingCHGraph
Traverses the base edges and shortcuts at a given node. This will only include shortcuts coming from higher level nodes, but *all* base edges with finite weight.- Specified by:
createInEdgeExplorer
in interfaceRoutingCHGraph
-
createOutEdgeExplorer
- Specified by:
createOutEdgeExplorer
in interfaceRoutingCHGraph
- See Also:
-
getEdgeIteratorState
- Specified by:
getEdgeIteratorState
in interfaceRoutingCHGraph
-
getLevel
public int getLevel(int node) - Specified by:
getLevel
in interfaceRoutingCHGraph
-
getTurnWeight
public double getTurnWeight(int inEdge, int viaNode, int outEdge) - Specified by:
getTurnWeight
in interfaceRoutingCHGraph
-
getBaseGraph
- Specified by:
getBaseGraph
in interfaceRoutingCHGraph
- Returns:
- the graph this CH graph is based on, i.e. a the base
Graph
or aQueryGraph
on top of the base graph todo: maybe it would be better to remove this method and use a direct reference to the base graph when it is needed
-
hasTurnCosts
public boolean hasTurnCosts()- Specified by:
hasTurnCosts
in interfaceRoutingCHGraph
-
isEdgeBased
public boolean isEdgeBased()- Specified by:
isEdgeBased
in interfaceRoutingCHGraph
-
getWeighting
- Specified by:
getWeighting
in interfaceRoutingCHGraph
-
close
public void close()- Specified by:
close
in interfaceRoutingCHGraph
-