Skip to content

Commit

Permalink
Set getOffBikeEnc for vehicle=no
Browse files Browse the repository at this point in the history
  • Loading branch information
ratrun committed Apr 22, 2024
1 parent 5ead1a5 commit 91352fc
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,7 @@ public void handleWayTags(int edgeId, EdgeIntAccess edgeIntAccess, ReaderWay way
boolean notIntended = !way.hasTag("bicycle", INTENDED) &&
(GET_OFF_BIKE.contains(highway)
|| way.hasTag("railway", "platform")
|| (way.hasTag("vehicle", "no") && highway != null && !highway.equals("cycleway"))
|| "path".equals(highway) && way.hasTag("foot", "designated") && !way.hasTag("segregated", "yes"));
if ("steps".equals(highway) || way.hasTag("bicycle", "dismount") || notIntended) {
getOffBikeEnc.setBool(false, edgeId, edgeIntAccess, true);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -103,6 +103,13 @@ public void testHandleCommonWayTags() {
way.setTag("foot", "designated");
assertTrue(isGetOffBike(way));

way = new ReaderWay(1);
way.setTag("highway", "track");
way.setTag("vehicle", "no");
assertTrue(isGetOffBike(way));
way.setTag("bicycle", "yes");
assertFalse(isGetOffBike(way));

way = new ReaderWay(1);
way.setTag("highway", "cycleway");
way.setTag("vehicle", "no");
Expand Down

0 comments on commit 91352fc

Please sign in to comment.