Class ExtendedNodeAccess

java.lang.Object
com.graphhopper.storage.ExtendedNodeAccess
All Implemented Interfaces:
NodeAccess, PointAccess

public class ExtendedNodeAccess extends Object implements NodeAccess
NodeAccess that allows adding additional points
  • Constructor Details

    • ExtendedNodeAccess

      public ExtendedNodeAccess(NodeAccess nodeAccess, PointList additionalNodes, int firstAdditionalNodeId)
      Parameters:
      nodeAccess - the node access this class delegates to
      additionalNodes - the additional points that should be used
      firstAdditionalNodeId - 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 interface PointAccess
    • is3D

      public boolean is3D()
      Specified by:
      is3D in interface PointAccess
    • getDimension

      public int getDimension()
      Specified by:
      getDimension in interface PointAccess
    • getLat

      public double getLat(int nodeId)
      Specified by:
      getLat in interface PointAccess
    • getLon

      public double getLon(int nodeId)
      Specified by:
      getLon in interface PointAccess
    • getEle

      public double getEle(int nodeId)
      Specified by:
      getEle in interface PointAccess
    • getTurnCostIndex

      public int getTurnCostIndex(int nodeId)
      Specified by:
      getTurnCostIndex in interface NodeAccess
      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 interface PointAccess
    • setTurnCostIndex

      public void setTurnCostIndex(int nodeId, int additionalValue)
      Description copied from interface: NodeAccess
      Sets the turn cost index for this node, using TurnCostStorage.NO_TURN_ENTRY means there are no turn costs at this node.

      Specified by:
      setTurnCostIndex in interface NodeAccess