Skip to content

Commit

Permalink
Revert "change OOST filtering to allow walking through subway stations"
Browse files Browse the repository at this point in the history
This reverts commit 2f7c39c.
  • Loading branch information
mbsalvatore committed Mar 18, 2024
1 parent 2f7c39c commit 276b1f4
Showing 1 changed file with 18 additions and 16 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -313,22 +313,7 @@ private boolean subwayHasNoOutOfSystemTransfer(Path<TripSchedule> path, TransitL
leg = leg.nextLeg();
if (leg.isTransitLeg()) {
if (leg.asTransitLeg().trip().getOriginalTripPattern().getMode() == TransitMode.SUBWAY) {
if (exitedSubway) {
//CANNOT RE-ENTER SUBWAY! ...
//... Unless this is an allowed out of system transfer
List<StopLocation> stopLocations = transitLayer.getStopIndex().stopsByIndex;
StopLocation fromStopLocation = stopLocations.get(leg.fromStop());
StopLocation toStopLocation = stopLocations.get(leg.toStop());
org.opentripplanner.model.transfer.Transfer allowedTransfer = transitLayer.getTransferService().findStopToStopTransfer(fromStopLocation, toStopLocation);
if (allowedTransfer == null)
return false;
else {
exitedSubway = false;
enteredSubway = false;
}
} else {
enteredSubway = true;
}
enteredSubway = true;
}
}
if (leg.isTransferLeg()) {
Expand All @@ -354,6 +339,23 @@ private boolean subwayHasNoOutOfSystemTransfer(Path<TripSchedule> path, TransitL
//We have entered non-subway transit therefore reset out of system subway tracking
exitedSubway = false;
enteredSubway = false;
continue;
}
if (exitedSubway) {
//CANNOT RE-ENTER SUBWAY! ...
//... Unless this is an allowed out of system transfer
List<StopLocation> stopLocations = transitLayer.getStopIndex().stopsByIndex;
StopLocation fromStopLocation = stopLocations.get(leg.fromStop());
StopLocation toStopLocation = stopLocations.get(leg.toStop());
org.opentripplanner.model.transfer.Transfer allowedTransfer = transitLayer.getTransferService().findStopToStopTransfer(fromStopLocation, toStopLocation);
if (allowedTransfer == null)
return false;
else {
exitedSubway = false;
enteredSubway = false;
}
} else {
exitedSubway = true;
}
}
}
Expand Down

0 comments on commit 276b1f4

Please sign in to comment.