public class VirtualEdgeIteratorState extends Object implements EdgeIteratorState, CHEdgeIteratorState
Note, this class is not suited for public use and can change with minor releases unexpectedly or even gets removed.
K_UNFAVORED_EDGE
Constructor and Description |
---|
VirtualEdgeIteratorState(int originalTraversalKey,
int edgeId,
int baseNode,
int adjNode,
double distance,
long flags,
String name,
PointList pointList) |
Modifier and Type | Method and Description |
---|---|
boolean |
canBeOverwritten(long flags)
This method is only used on preparation.
|
EdgeIteratorState |
copyPropertiesTo(EdgeIteratorState edge)
Copies the properties of this edge into the specified edge.
|
EdgeIteratorState |
detach(boolean reverse)
Clones this EdgeIteratorState.
|
PointList |
fetchWayGeometry(int mode)
For roadnetwork data like OSM a way is nearly always a curve not just a straight line.
|
int |
getAdditionalField() |
int |
getAdjNode() |
int |
getBaseNode()
Returns the node used to instantiate the EdgeIterator.
|
boolean |
getBool(int key,
boolean _default)
Get additional boolean information of the edge.
|
double |
getDistance() |
int |
getEdge() |
long |
getFlags() |
String |
getName() |
int |
getOriginalTraversalKey()
This method returns the original edge via its traversal key.
|
int |
getSkippedEdge1() |
int |
getSkippedEdge2() |
double |
getWeight()
Returns the weight of this shortcut.
|
boolean |
isBackward(FlagEncoder encoder) |
boolean |
isForward(FlagEncoder encoder) |
boolean |
isShortcut() |
EdgeIteratorState |
setAdditionalField(int value)
Updates the additional field value for this edge
|
EdgeIteratorState |
setDistance(double dist) |
EdgeIteratorState |
setFlags(long flags) |
EdgeIteratorState |
setName(String name) |
void |
setSkippedEdges(int edge1,
int edge2)
Sets the edges that this shortcut skips.
|
void |
setUnfavored(boolean unfavored)
This method sets edge to unfavored status for routing from or to the start/stop points.
|
EdgeIteratorState |
setWayGeometry(PointList list) |
CHEdgeIteratorState |
setWeight(double weight)
Sets the weight calculated from Weighting.calcWeight, only applicable if isShortcut is true.
|
String |
toString() |
public int getOriginalTraversalKey()
public int getEdge()
getEdge
in interface EdgeIteratorState
public int getBaseNode()
EdgeIteratorState
getBaseNode
in interface EdgeIteratorState
EdgeIterator
public int getAdjNode()
getAdjNode
in interface EdgeIteratorState
EdgeIterator
public PointList fetchWayGeometry(int mode)
EdgeIteratorState
fetchWayGeometry
in interface EdgeIteratorState
mode
- can be public EdgeIteratorState setWayGeometry(PointList list)
setWayGeometry
in interface EdgeIteratorState
list
- is a sorted collection of nodes between the baseNode and the current adjacent
node. Specify the list without the adjacent and base nodes.public double getDistance()
getDistance
in interface EdgeIteratorState
public EdgeIteratorState setDistance(double dist)
setDistance
in interface EdgeIteratorState
public long getFlags()
getFlags
in interface EdgeIteratorState
public EdgeIteratorState setFlags(long flags)
setFlags
in interface EdgeIteratorState
public String getName()
getName
in interface EdgeIteratorState
public EdgeIteratorState setName(String name)
setName
in interface EdgeIteratorState
public boolean getBool(int key, boolean _default)
EdgeIteratorState
getBool
in interface EdgeIteratorState
key
- direction or vehicle dependent integer key_default
- default value if key is not foundpublic void setUnfavored(boolean unfavored)
public boolean isShortcut()
isShortcut
in interface CHEdgeIteratorState
public boolean isForward(FlagEncoder encoder)
isForward
in interface EdgeIteratorState
and #472
public boolean isBackward(FlagEncoder encoder)
isBackward
in interface EdgeIteratorState
and #472
public int getAdditionalField()
getAdditionalField
in interface EdgeIteratorState
public boolean canBeOverwritten(long flags)
CHEdgeIteratorState
canBeOverwritten
in interface CHEdgeIteratorState
PrepareEncoder.canBeOverwritten(long, long)
public int getSkippedEdge1()
getSkippedEdge1
in interface CHEdgeIteratorState
public int getSkippedEdge2()
getSkippedEdge2
in interface CHEdgeIteratorState
public void setSkippedEdges(int edge1, int edge2)
CHEdgeIteratorState
setSkippedEdges
in interface CHEdgeIteratorState
public EdgeIteratorState detach(boolean reverse)
EdgeIteratorState
detach
in interface EdgeIteratorState
reverse
- if true a detached edgeState with reversed properties is created where base
and adjacent nodes, flags and wayGeometry are in reversed order. See #162 for more details
about why we need the new reverse parameter.public EdgeIteratorState setAdditionalField(int value)
EdgeIteratorState
setAdditionalField
in interface EdgeIteratorState
public EdgeIteratorState copyPropertiesTo(EdgeIteratorState edge)
EdgeIteratorState
copyPropertiesTo
in interface EdgeIteratorState
public CHEdgeIteratorState setWeight(double weight)
CHEdgeIteratorState
setWeight
in interface CHEdgeIteratorState
public double getWeight()
CHEdgeIteratorState
getWeight
in interface CHEdgeIteratorState
Copyright © 2012–2016. All rights reserved.