@@ -58,9 +58,9 @@ class InstructionsOutgoingEdges {
58
58
private final EdgeIteratorState prevEdge ;
59
59
private final EdgeIteratorState currentEdge ;
60
60
// Outgoing edges that we would be allowed to turn on
61
- private final List <EdgeIteratorState > allowedOutgoingEdges ;
61
+ private final List <EdgeIteratorState > filteredOutgoingEdges ;
62
62
// All outgoing edges, including oneways in the wrong direction
63
- private final List <EdgeIteratorState > allOutgoingEdges ;
63
+ private final List <EdgeIteratorState > filteredEdges ;
64
64
private final DecimalEncodedValue maxSpeedEnc ;
65
65
private final DecimalEncodedValue avgSpeedEnc ;
66
66
private final NodeAccess nodeAccess ;
@@ -83,15 +83,15 @@ public InstructionsOutgoingEdges(EdgeIteratorState prevEdge,
83
83
84
84
EdgeIteratorState tmpEdge ;
85
85
86
- allOutgoingEdges = new ArrayList <>();
87
- allowedOutgoingEdges = new ArrayList <>();
86
+ filteredEdges = new ArrayList <>();
87
+ filteredOutgoingEdges = new ArrayList <>();
88
88
EdgeIterator edgeIter = crossingExplorer .setBaseNode (baseNode );
89
89
while (edgeIter .next ()) {
90
90
if (edgeIter .getAdjNode () != prevNode && edgeIter .getAdjNode () != adjNode ) {
91
91
tmpEdge = edgeIter .detach (false );
92
- allOutgoingEdges .add (tmpEdge );
92
+ filteredEdges .add (tmpEdge );
93
93
if (tmpEdge .get (accessEnc )) {
94
- allowedOutgoingEdges .add (tmpEdge );
94
+ filteredOutgoingEdges .add (tmpEdge );
95
95
}
96
96
}
97
97
}
@@ -102,15 +102,15 @@ public InstructionsOutgoingEdges(EdgeIteratorState prevEdge,
102
102
* roads one might take at the intersection. This excludes the road you are coming from and inaccessible roads.
103
103
*/
104
104
public int nrOfAllowedOutgoingEdges () {
105
- return 1 + allowedOutgoingEdges .size ();
105
+ return 1 + filteredOutgoingEdges .size ();
106
106
}
107
107
108
108
/**
109
109
* This method calculates the number of all outgoing edges, which could be considered the number of roads you see
110
110
* at the intersection. This excludes the road your are coming from.
111
111
*/
112
112
public int nrOfAllOutgoingEdges () {
113
- return 1 + allOutgoingEdges .size ();
113
+ return 1 + filteredEdges .size ();
114
114
}
115
115
116
116
@@ -129,7 +129,7 @@ public boolean outgoingEdgesAreSlowerByFactor(double factor) {
129
129
130
130
double maxSurroundingSpeed = -1 ;
131
131
132
- for (EdgeIteratorState edge : allOutgoingEdges ) {
132
+ for (EdgeIteratorState edge : filteredEdges ) {
133
133
tmpSpeed = getSpeed (edge );
134
134
if (tmpSpeed < 1 ) {
135
135
// This might happen for the DataFlagEncoder, might create unnecessary turn instructions
@@ -162,7 +162,7 @@ private double getSpeed(EdgeIteratorState edge) {
162
162
*/
163
163
public EdgeIteratorState getOtherContinue (double prevLat , double prevLon , double prevOrientation ) {
164
164
int tmpSign ;
165
- for (EdgeIteratorState edge : allowedOutgoingEdges ) {
165
+ for (EdgeIteratorState edge : filteredOutgoingEdges ) {
166
166
GHPoint point = InstructionsHelper .getPointForOrientationCalculation (edge , nodeAccess );
167
167
tmpSign = InstructionsHelper .calculateSign (prevLat , prevLon , point .getLat (), point .getLon (), prevOrientation );
168
168
if (Math .abs (tmpSign ) <= 1 ) {
@@ -184,7 +184,7 @@ public boolean isLeavingCurrentStreet(String prevName, String name) {
184
184
185
185
// If flags are changing, there might be a chance we find these flags on a different edge
186
186
boolean checkFlag = currentEdge .getFlags () != prevEdge .getFlags ();
187
- for (EdgeIteratorState edge : allowedOutgoingEdges ) {
187
+ for (EdgeIteratorState edge : filteredOutgoingEdges ) {
188
188
String edgeName = edge .getName ();
189
189
IntsRef edgeFlag = edge .getFlags ();
190
190
// leave the current street || enter a different street
0 commit comments