Skip to content

Commit

Permalink
Incorporate review comment
Browse files Browse the repository at this point in the history
  • Loading branch information
ratrun committed Apr 21, 2024
1 parent 763c45a commit 81ef8ea
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -76,10 +76,13 @@ public WayAccess getAccess(ReaderWay way) {
return WayAccess.CAN_SKIP;
}

// use the way if it is tagged for bikes
if (way.hasTag("bicycle", "dismount") || (way.hasTag("highway", "cycleway") && !way.hasTag("access", "no")))
// use the way for pushing
if (way.hasTag("bicycle", "dismount") || way.hasTag("vehicle", "no"))
return WayAccess.WAY;

if (way.hasTag("access", "no") && (!way.hasTag("bicycle:conditional")) && (!way.hasTag("bicycle", intendedValues)))
return WayAccess.CAN_SKIP;

int firstIndex = way.getFirstIndex(restrictionKeys);
if (firstIndex >= 0) {
String firstValue = way.getTag(restrictionKeys.get(firstIndex), "");
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -211,8 +211,6 @@ else if (way.hasTag("highway", pushingSectionsHighways)
speed = Math.min(speed, surfaceSpeed);
}
}
if (way.hasTag("vehicle", "no"))
speed = PUSHING_SECTION_SPEED;
return speed;
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -192,7 +192,7 @@ public void testAccess() {
way.clearTags();
way.setTag("highway", "secondary");
way.setTag("vehicle", "no");
assertTrue(accessParser.getAccess(way).canSkip());
assertTrue(accessParser.getAccess(way).isWay());
way.setTag("bicycle", "dismount");
assertTrue(accessParser.getAccess(way).isWay());

Expand Down

0 comments on commit 81ef8ea

Please sign in to comment.