Skip to content

Commit d39ab72

Browse files
committed
Merge remote-tracking branch 'origin/entrance-bug' into dev-2.x
2 parents c969c9d + 601e823 commit d39ab72

File tree

2 files changed

+6
-2
lines changed

2 files changed

+6
-2
lines changed

application/src/main/java/org/opentripplanner/model/plan/WalkStepBuilder.java

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -138,6 +138,10 @@ public String directionTextNoParens() {
138138
return str;
139139
}
140140

141+
public boolean hasEntrance() {
142+
return entrance != null;
143+
}
144+
141145
public WalkStepBuilder addStreetNotes(Set<StreetNote> notes) {
142146
this.streetNotes.addAll(notes);
143147
return this;

application/src/main/java/org/opentripplanner/routing/algorithm/mapping/StatesToWalkStepsMapper.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -275,11 +275,11 @@ private void processState(State backState, State forwardState) {
275275
boolean isOnSameStreet = lastStep
276276
.directionTextNoParens()
277277
.equals(threeBack.directionTextNoParens());
278-
if (twoBack.distance() < MAX_ZAG_DISTANCE && isOnSameStreet) {
278+
if (twoBack.distance() < MAX_ZAG_DISTANCE && isOnSameStreet && !twoBack.hasEntrance()) {
279279
if (isUTurn(twoBack, lastStep)) {
280280
steps.remove(lastIndex - 1);
281281
processUTurn(lastStep, twoBack);
282-
} else {
282+
} else if (!lastStep.hasEntrance()) {
283283
// total hack to remove zags.
284284
steps.remove(lastIndex);
285285
steps.remove(lastIndex - 1);

0 commit comments

Comments
 (0)