Skip to content

Commit

Permalink
Keep priorities for bikenetwork in MountainBikePriorityParser
Browse files Browse the repository at this point in the history
  • Loading branch information
ratrun committed Nov 7, 2023
1 parent d32c7bb commit abb31a2
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 9 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -22,9 +22,9 @@ protected MountainBikePriorityParser(DecimalEncodedValue speedEnc, DecimalEncode
EnumEncodedValue<RouteNetwork> bikeRouteEnc) {
super(priorityEnc, speedEnc, bikeRouteEnc);

routeMap.put(INTERNATIONAL, BEST.getValue());
routeMap.put(NATIONAL, BEST.getValue());
routeMap.put(REGIONAL, BEST.getValue());
routeMap.put(INTERNATIONAL, PREFER.getValue());
routeMap.put(NATIONAL, PREFER.getValue());
routeMap.put(REGIONAL, PREFER.getValue());
routeMap.put(LOCAL, BEST.getValue());

preferHighwayTags.add("road");
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -145,7 +145,7 @@ public void testHandleWayTagsInfluencedByBikeAndMtbRelation() {
// relation code is PREFER
osmRel.setTag("route", "bicycle");
osmRel.setTag("network", "lcn");
assertPriorityAndSpeed(PREFER, 18, osmWay, osmRel);
assertPriorityAndSpeed(BEST, 18, osmWay, osmRel);

// relation code is PREFER
osmRel.setTag("network", "rcn");
Expand All @@ -162,7 +162,7 @@ public void testHandleWayTagsInfluencedByBikeAndMtbRelation() {

osmRel.setTag("route", "bicycle");
osmRel.setTag("network", "lcn");
assertPriorityAndSpeed(PREFER, 18, osmWay, osmRel);
assertPriorityAndSpeed(BEST, 18, osmWay, osmRel);

osmWay.clearTags();
osmRel.clearTags();
Expand All @@ -172,20 +172,20 @@ public void testHandleWayTagsInfluencedByBikeAndMtbRelation() {

osmRel.setTag("route", "mtb");
osmRel.setTag("network", "lcn");
assertPriorityAndSpeed(BEST, 18, osmWay, osmRel);
assertPriorityAndSpeed(PREFER, 18, osmWay, osmRel);

osmRel.setTag("network", "rcn");
assertPriorityAndSpeed(BEST, 18, osmWay, osmRel);
assertPriorityAndSpeed(PREFER, 18, osmWay, osmRel);

osmRel.setTag("network", "ncn");
assertPriorityAndSpeed(BEST, 18, osmWay, osmRel);
assertPriorityAndSpeed(PREFER, 18, osmWay, osmRel);

osmWay.clearTags();
osmWay.setTag("highway", "tertiary");

osmRel.setTag("route", "mtb");
osmRel.setTag("network", "lcn");
assertPriorityAndSpeed(BEST, 18, osmWay, osmRel);
assertPriorityAndSpeed(PREFER, 18, osmWay, osmRel);
}

// Issue 407 : Always block kissing_gate except for mountainbikes
Expand Down

0 comments on commit abb31a2

Please sign in to comment.