Skip to content

Commit

Permalink
Allow sac_scale=hiking for race bike, see discussion in graphhopper#2357
Browse files Browse the repository at this point in the history
  • Loading branch information
ratrun authored Jul 7, 2021
1 parent e692138 commit 5076392
Show file tree
Hide file tree
Showing 3 changed files with 0 additions and 14 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -234,9 +234,6 @@ public EncodingManager.Access getAccess(ReaderWay way) {

String sacScale = way.getTag("sac_scale");
if (sacScale != null) {
if ((way.hasTag("highway", "cycleway"))
&& (way.hasTag("sac_scale", "hiking")))
return EncodingManager.Access.WAY;
if (!isSacScaleAllowed(sacScale))
return EncodingManager.Access.CAN_SKIP;
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -150,12 +150,6 @@ else if (trackType == null || trackType.startsWith("grade"))
}
}

@Override
boolean isSacScaleAllowed(String sacScale) {
// for racing bike it is only allowed if empty
return false;
}

@Override
public String toString() {
return "racingbike";
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -78,11 +78,6 @@ public void testSacScale() {

way.setTag("highway", "path");
way.setTag("sac_scale", "hiking");
assertTrue(encoder.getAccess(way).canSkip());

way.setTag("highway", "cycleway");
way.setTag("sac_scale", "hiking");
// but allow this as there is no reason for not allowing it
assertTrue(encoder.getAccess(way).isWay());

// This looks to be tagging error:
Expand Down

0 comments on commit 5076392

Please sign in to comment.