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 TypeMethodDescriptionvoidensureNode(int nodeId) intdoublegetEle(int nodeId) doublegetLat(int nodeId) doublegetLon(int nodeId) intgetTurnCostIndex(int nodeId) booleanis3D()voidsetNode(int nodeId, double lat, double lon, double ele) voidsetTurnCostIndex(int nodeId, int additionalValue) Sets the turn cost index for this node, usingTurnCostStorage.NO_TURN_ENTRYmeans 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, waitMethods 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:
ensureNodein interfacePointAccess
-
is3D
public boolean is3D()- Specified by:
is3Din interfacePointAccess
-
getDimension
public int getDimension()- Specified by:
getDimensionin interfacePointAccess
-
getLat
public double getLat(int nodeId) - Specified by:
getLatin interfacePointAccess
-
getLon
public double getLon(int nodeId) - Specified by:
getLonin interfacePointAccess
-
getEle
public double getEle(int nodeId) - Specified by:
getElein interfacePointAccess
-
getTurnCostIndex
public int getTurnCostIndex(int nodeId) - Specified by:
getTurnCostIndexin interfaceNodeAccess- Returns:
- the index used to retrieve turn cost information for this node, can be
TurnCostStorage.NO_TURN_ENTRYin case no turn costs were stored for this node
-
setNode
public void setNode(int nodeId, double lat, double lon, double ele) - Specified by:
setNodein interfacePointAccess
-
setTurnCostIndex
public void setTurnCostIndex(int nodeId, int additionalValue) Description copied from interface:NodeAccessSets the turn cost index for this node, usingTurnCostStorage.NO_TURN_ENTRYmeans there are no turn costs at this node.- Specified by:
setTurnCostIndexin interfaceNodeAccess
-