Skip to content

Commit

Permalink
Use surface speed at bridgleways for bicycle profiles
Browse files Browse the repository at this point in the history
  • Loading branch information
ratrun committed Aug 23, 2024
1 parent a506df8 commit caff90f
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -160,7 +160,8 @@ else if (way.hasTag("bicycle", "yes"))
speed = PUSHING_SECTION_SPEED; // unknown surface
} else if (way.hasTag("service")) {
speed = highwaySpeeds.get("living_street");
} else if ("track".equals(highwayValue)) {
} else if ("track".equals(highwayValue) ||
"bridleway".equals(highwayValue) ) {
if (surfaceSpeed != null)
speed = surfaceSpeed;
else if (trackTypeSpeeds.containsKey(trackTypeValue))
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -305,6 +305,14 @@ public void testSpeedAndPriority() {
assertPriorityAndSpeed(VERY_NICE, PUSHING_SECTION_SPEED, way);
way.setTag("bicycle", "yes");
assertPriorityAndSpeed(VERY_NICE, 18, way);

way.clearTags();
way.setTag("highway", "bridleway");
assertPriorityAndSpeed(AVOID, PUSHING_SECTION_SPEED, way);
way.setTag("surface", "gravel");
assertPriorityAndSpeed(AVOID, 12, way);
way.setTag("bicycle", "designated");
assertPriorityAndSpeed(PREFER, 12, way);
}

@Test
Expand Down

0 comments on commit caff90f

Please sign in to comment.