Skip to content

Commit

Permalink
Assume Toll.HGV for all roads in CH/LI (graphhopper#3043)
Browse files Browse the repository at this point in the history
* Assume Toll.HGV for all roads in Switzerland

* Assume Toll.HGV for all roads in Liechtenstein
  • Loading branch information
otbutz authored Aug 22, 2024
1 parent f474257 commit 2182ff8
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 8 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,6 @@ public Toll getToll(ReaderWay readerWay, Toll currentToll) {
return currentToll;
}

return Toll.NO;
return Toll.HGV;
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -36,12 +36,9 @@ public Toll getToll(ReaderWay readerWay, Toll currentToll) {
}

RoadClass roadClass = RoadClass.find(readerWay.getTag("highway", ""));
switch (roadClass) {
case MOTORWAY:
case TRUNK:
return Toll.ALL;
default:
return currentToll;
}
return switch (roadClass) {
case MOTORWAY, TRUNK -> Toll.ALL;
default -> Toll.HGV;
};
}
}

0 comments on commit 2182ff8

Please sign in to comment.