public class ExtendedNodeAccess extends Object implements NodeAccess
NodeAccess
that allows adding additional pointsConstructor and Description |
---|
ExtendedNodeAccess(NodeAccess nodeAccess,
PointList additionalNodes,
int firstAdditionalNodeId) |
Modifier and Type | Method and Description |
---|---|
void |
ensureNode(int nodeId) |
int |
getDimension() |
double |
getEle(int nodeId) |
double |
getElevation(int nodeId) |
double |
getLat(int nodeId) |
double |
getLatitude(int nodeId) |
double |
getLon(int nodeId) |
double |
getLongitude(int nodeId) |
int |
getTurnCostIndex(int nodeId) |
boolean |
is3D() |
void |
setNode(int nodeId,
double lat,
double lon) |
void |
setNode(int nodeId,
double lat,
double lon,
double ele) |
void |
setTurnCostIndex(int nodeId,
int additionalValue)
Sets the turn cost index for this node, using
TurnCostStorage.NO_TURN_ENTRY means there
are no turn costs at this node. |
public ExtendedNodeAccess(NodeAccess nodeAccess, PointList additionalNodes, int firstAdditionalNodeId)
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)public void ensureNode(int nodeId)
ensureNode
in interface PointAccess
public boolean is3D()
is3D
in interface PointAccess
public int getDimension()
getDimension
in interface PointAccess
public double getLatitude(int nodeId)
getLatitude
in interface PointAccess
public double getLongitude(int nodeId)
getLongitude
in interface PointAccess
public double getElevation(int nodeId)
getElevation
in interface PointAccess
public int getTurnCostIndex(int nodeId)
getTurnCostIndex
in interface NodeAccess
TurnCostStorage.NO_TURN_ENTRY
in case no turn costs were stored for this nodepublic void setNode(int nodeId, double lat, double lon)
setNode
in interface PointAccess
public void setNode(int nodeId, double lat, double lon, double ele)
setNode
in interface PointAccess
public void setTurnCostIndex(int nodeId, int additionalValue)
NodeAccess
TurnCostStorage.NO_TURN_ENTRY
means there
are no turn costs at this node.
setTurnCostIndex
in interface NodeAccess
public double getLat(int nodeId)
getLat
in interface PointAccess
public double getLon(int nodeId)
getLon
in interface PointAccess
public double getEle(int nodeId)
getEle
in interface PointAccess
Copyright © 2012–2020. All rights reserved.