Package com.graphhopper.storage
Class ExtendedNodeAccess
java.lang.Object
com.graphhopper.storage.ExtendedNodeAccess
- All Implemented Interfaces:
NodeAccess
,PointAccess
NodeAccess
that allows adding additional points-
Constructor Summary
ConstructorsConstructorDescriptionExtendedNodeAccess
(NodeAccess nodeAccess, PointList additionalNodes, int firstAdditionalNodeId) -
Method Summary
Modifier and TypeMethodDescriptionvoid
ensureNode
(int nodeId) int
double
getEle
(int nodeId) double
getLat
(int nodeId) double
getLon
(int nodeId) int
getTurnCostIndex
(int nodeId) boolean
is3D()
void
setNode
(int nodeId, double lat, double lon, double ele) void
setTurnCostIndex
(int nodeId, int additionalValue) Sets the turn cost index for this node, usingTurnCostStorage.NO_TURN_ENTRY
means there are no turn costs at this node.Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface com.graphhopper.util.PointAccess
setNode
-
Constructor Details
-
ExtendedNodeAccess
public ExtendedNodeAccess(NodeAccess nodeAccess, PointList additionalNodes, int firstAdditionalNodeId) - Parameters:
nodeAccess
- the node access this class delegates toadditionalNodes
- the additional points that should be usedfirstAdditionalNodeId
- the node id that is used for the first additional point (all other nodes will use consecutive ids)
-
-
Method Details
-
ensureNode
public void ensureNode(int nodeId) - Specified by:
ensureNode
in interfacePointAccess
-
is3D
public boolean is3D()- Specified by:
is3D
in interfacePointAccess
-
getDimension
public int getDimension()- Specified by:
getDimension
in interfacePointAccess
-
getLat
public double getLat(int nodeId) - Specified by:
getLat
in interfacePointAccess
-
getLon
public double getLon(int nodeId) - Specified by:
getLon
in interfacePointAccess
-
getEle
public double getEle(int nodeId) - Specified by:
getEle
in interfacePointAccess
-
getTurnCostIndex
public int getTurnCostIndex(int nodeId) - Specified by:
getTurnCostIndex
in interfaceNodeAccess
- Returns:
- the index used to retrieve turn cost information for this node, can be
TurnCostStorage.NO_TURN_ENTRY
in case no turn costs were stored for this node
-
setNode
public void setNode(int nodeId, double lat, double lon, double ele) - Specified by:
setNode
in interfacePointAccess
-
setTurnCostIndex
public void setTurnCostIndex(int nodeId, int additionalValue) Description copied from interface:NodeAccess
Sets the turn cost index for this node, usingTurnCostStorage.NO_TURN_ENTRY
means there are no turn costs at this node.- Specified by:
setTurnCostIndex
in interfaceNodeAccess
-