File tree Expand file tree Collapse file tree 1 file changed +8
-3
lines changed
reader-gtfs/src/main/java/com/graphhopper/reader/gtfs Expand file tree Collapse file tree 1 file changed +8
-3
lines changed Original file line number Diff line number Diff line change @@ -85,10 +85,15 @@ public boolean tryAdvance(Consumer<? super EdgeIteratorState> action) {
85
85
// time expanded network. Later departures are reached via
86
86
// WAIT edges. Algorithmically not necessary, and does not
87
87
// reduce total number of relaxed nodes, but takes stress
88
- // off the priority queue.
88
+ // off the priority queue. Additionally, when only walking,
89
+ // don't bother finding the enterEdge, because we are not going to enter.
89
90
if (edgeType == GtfsStorage .EdgeType .ENTER_TIME_EXPANDED_NETWORK ) {
90
- action .accept (findEnterEdge ()); // fully consumes edgeIterator
91
- return true ;
91
+ if (walkOnly ) {
92
+ return false ;
93
+ } else {
94
+ action .accept (findEnterEdge ()); // fully consumes edgeIterator
95
+ return true ;
96
+ }
92
97
}
93
98
94
99
action .accept (edgeIterator );
You can’t perform that action at this time.
0 commit comments