Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

allow bridleways with bicycle=yes for bike profiles #1172

Merged
merged 6 commits into from
Jun 20, 2022
Merged
Show file tree
Hide file tree
Changes from 2 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,7 @@ RELEASING:
- python code on decoding polylines including elevation data
- Czech language support (thanks to [trendspotter](https://github.com/trendspotter) for the translation)
### Fixed
- allow bridleways with bicycle=yes for bike profiles ([#1167](https://github.com/GIScience/openrouteservice/issues/1167))
- improved log file settings error message ([#1110](https://github.com/GIScience/openrouteservice/issues/1110))
- Dockerfile now creates intermediate directories if they are not present ([#1109](https://github.com/GIScience/openrouteservice/issues/1109))
- internal properties of `IsochronesRequest` model not ignored for swagger file generation
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -70,6 +70,7 @@ public abstract class CommonBikeFlagEncoder extends ORSAbstractFlagEncoder {
public static final String KEY_JUNCTION = "junction";
public static final String KEY_SEGREGATED = "segregated";
public static final String KEY_ONEWAY_BICYCLE = "oneway:bicycle";
public static final String KEY_BRIDLEWAY = "bridleway";

// Pushing section highways are parts where you need to get off your bike and push it (German: Schiebestrecke)
protected final HashSet<String> pushingSectionsHighways = new HashSet<>();
Expand Down Expand Up @@ -245,6 +246,10 @@ protected CommonBikeFlagEncoder(int speedBits, double speedFactor, int maxTurnCo
avoidHighwayTags.add(KEY_MOTORWAY);
avoidHighwayTags.add(KEY_MOTORWAY_LINK);

// bridleways are allowed to ride over in some cases
setHighwaySpeed(KEY_BRIDLEWAY, 6);
avoidHighwayTags.add(KEY_BRIDLEWAY);

setCyclingNetworkPreference("icn", BEST.getValue());
setCyclingNetworkPreference("ncn", BEST.getValue());
setCyclingNetworkPreference("rcn", VERY_NICE.getValue());
Expand Down Expand Up @@ -343,7 +348,7 @@ public EncodingManager.Access getAccess(ReaderWay way) {
}

// accept only if explicitly tagged for bike usage
if (KEY_MOTORWAY.equals(highwayValue) || KEY_MOTORWAY_LINK.equals(highwayValue)) {
if (KEY_MOTORWAY.equals(highwayValue) || KEY_MOTORWAY_LINK.equals(highwayValue) || KEY_BRIDLEWAY.equals(highwayValue)) {
return EncodingManager.Access.CAN_SKIP;
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -138,6 +138,7 @@ public RoadBikeFlagEncoder(int speedBits, double speedFactor, int maxTurnCosts,
addPushingSection("footway");
addPushingSection("pedestrian");
addPushingSection("steps");
addPushingSection(KEY_BRIDLEWAY);

setCyclingNetworkPreference("icn", PriorityCode.BEST.getValue());
setCyclingNetworkPreference("ncn", PriorityCode.BEST.getValue());
Expand Down