Skip to content

Commit 5200455

Browse files
committed
add comment to TarjanIslandPruner wrt no-thru-traffic
1 parent 3e42e2a commit 5200455

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

src/main/java/com/conveyal/r5/streets/TarjanIslandPruner.java

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -279,6 +279,11 @@ public void forEachOutgoingEdge (int vertex, Consumer<EdgeStore.Edge> consumer)
279279
edgeCursor.seek(eidx);
280280

281281
// filter by mode
282+
// NB by not including e.g. NO_THRU_TRAFFIC_PEDESTRIAN here, NO_THRU_TRAFFIC edges
283+
// will create separate subgraphs. Prima facie, this seems pretty sensible, but it does
284+
// mean that e.g. driveways marked access=private (and thus no thru traffic) will get removed
285+
// by the island removal process, because the node at the end of the driveway will be considered
286+
// an island of size one.
282287
switch (mode) {
283288
case WALK:
284289
if (!edgeCursor.getFlag(EdgeStore.EdgeFlag.ALLOWS_PEDESTRIAN)) return true;

0 commit comments

Comments
 (0)