public static class GHUtility.DisabledEdgeIterator extends Object implements CHEdgeIterator
EdgeIterator.Edge
NO_EDGE
K_UNFAVORED_EDGE
Constructor and Description |
---|
DisabledEdgeIterator() |
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.
|
EdgeIterator |
detach(boolean reverse)
Clones this EdgeIteratorState.
|
PointList |
fetchWayGeometry(int type)
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 |
getSkippedEdge1() |
int |
getSkippedEdge2() |
double |
getWeight()
Returns the weight of this shortcut.
|
boolean |
isBackward(FlagEncoder encoder) |
boolean |
isForward(FlagEncoder encoder) |
boolean |
isShortcut() |
boolean |
next()
To be called to go to the next edge state.
|
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.
|
EdgeIteratorState |
setWayGeometry(PointList list) |
CHEdgeIteratorState |
setWeight(double weight)
Sets the weight calculated from Weighting.calcWeight, only applicable if isShortcut is true.
|
public EdgeIterator 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 setDistance(double dist)
setDistance
in interface EdgeIteratorState
public EdgeIteratorState setFlags(long flags)
setFlags
in interface EdgeIteratorState
public boolean next()
EdgeIterator
next
in interface EdgeIterator
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 double getDistance()
getDistance
in interface EdgeIteratorState
public long getFlags()
getFlags
in interface EdgeIteratorState
public PointList fetchWayGeometry(int type)
EdgeIteratorState
fetchWayGeometry
in interface EdgeIteratorState
type
- 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 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 boolean isBackward(FlagEncoder encoder)
isBackward
in interface EdgeIteratorState
and #472
public boolean isForward(FlagEncoder encoder)
isForward
in interface EdgeIteratorState
and #472
public int getAdditionalField()
getAdditionalField
in interface EdgeIteratorState
public EdgeIteratorState setAdditionalField(int value)
EdgeIteratorState
setAdditionalField
in interface EdgeIteratorState
public EdgeIteratorState copyPropertiesTo(EdgeIteratorState edge)
EdgeIteratorState
copyPropertiesTo
in interface EdgeIteratorState
public boolean isShortcut()
isShortcut
in interface CHEdgeIteratorState
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 double getWeight()
CHEdgeIteratorState
getWeight
in interface CHEdgeIteratorState
public CHEdgeIteratorState setWeight(double weight)
CHEdgeIteratorState
setWeight
in interface CHEdgeIteratorState
public boolean canBeOverwritten(long flags)
CHEdgeIteratorState
canBeOverwritten
in interface CHEdgeIteratorState
PrepareEncoder.canBeOverwritten(long, long)
Copyright © 2012–2016. All rights reserved.