Repository: graphhopper/graphhopper (language: java)

Issue:
England/Wales public bridleway implies foot=yes
Re: http://www.openstreetmap.org/directions?engine=graphhopper_foot&route=52.62530%2C1.22115%3B52.62559%2C1.21839#map=17/52.62689/1.22147&layers=N

As per http://wiki.openstreetmap.org/wiki/Tag:highway=bridleway the pedestrian routing should permit access to highway=bridleway with designation=public_bridleway.

Alternatively generally presume foot=yes like the wiki Implies section, except where the way exists inside the country of Germany, in which case presume foot=no.



Discussion / hints:
Thanks! Do you know of other countries with different defaults?

Related to #175 

Only aware of Germany to date myself from the note on the wiki page.

Came across this issue in https://github.com/GIScience/openrouteservice/issues/413, there is a case in India documented.

> Alternatively generally presume foot=yes like the wiki Implies section, except where the way exists inside the country of Germany, in which case presume foot=no.

I do also think that this would be the solution for the current situation.

From the[ OSM wiki](https://wiki.openstreetmap.org/wiki/Tag:highway%3Dbridleway):
> In Germany, bridleways on public land is regulated by the traffic code (Straßenverkehrsordnung). The blue sign StVO 238 designates a way for riding only. **Thus using by pedestrians, bicycles and motor vehicles is excluded**, as long as no special permission is given by additional signage.
> 
> **Only those public bridleways should tagged with highway=bridleway.** 

Maybe consider to flag this issue as a bug?

Fix patch:
diff --git a/core/src/main/resources/com/graphhopper/custom_models/foot.json b/core/src/main/resources/com/graphhopper/custom_models/foot.json
index d3fba8ce839..06cdac0d801 100644
--- a/core/src/main/resources/com/graphhopper/custom_models/foot.json
+++ b/core/src/main/resources/com/graphhopper/custom_models/foot.json
@@ -1,6 +1,6 @@
 // to use this custom model you need to set the following option in the config.yml
 // graph.elevation.provider: srtm   # enables elevation
-// graph.encoded_values: foot_access, foot_priority, foot_average_speed, foot_road_access, hike_rating, mtb_rating, average_slope
+// graph.encoded_values: foot_access, foot_priority, foot_average_speed, foot_road_access, hike_rating, mtb_rating, average_slope, country, road_class
 // profiles:
 //    - name: foot
 //      custom_model_files: [foot.json, foot_elevation.json]
@@ -9,6 +9,7 @@
   "priority": [
     { "if": "!foot_access || hike_rating >= 2 || mtb_rating > 2", "multiply_by": "0" },
     { "else": "", "multiply_by": "foot_priority"},
+    { "if": "country == DEU && road_class == BRIDLEWAY && foot_road_access != YES", "multiply_by": "0" },
     { "if": "foot_road_access == PRIVATE", "multiply_by": "0" }
   ],
   "speed": [


Test patch:
diff --git a/core/src/test/java/com/graphhopper/routing/RoutingAlgorithmWithOSMTest.java b/core/src/test/java/com/graphhopper/routing/RoutingAlgorithmWithOSMTest.java
index fc3c47fa61d..7d1d247e0ca 100644
--- a/core/src/test/java/com/graphhopper/routing/RoutingAlgorithmWithOSMTest.java
+++ b/core/src/test/java/com/graphhopper/routing/RoutingAlgorithmWithOSMTest.java
@@ -711,7 +711,7 @@ private GraphHopper createHopper(String osmFile, Profile... profiles) {
                         "bike_access, bike_priority, bike_average_speed, foot_network, roundabout, " +
                         "mtb_access, mtb_priority, mtb_average_speed, mtb_rating, " +
                         "racingbike_access, racingbike_priority, racingbike_average_speed, " +
-                        "foot_road_access, bike_road_access").
+                        "foot_road_access, bike_road_access, country, road_class").
                 setGraphHopperLocation(GH_LOCATION);
         hopper.getRouterConfig().setSimplifyResponse(false);
         hopper.setMinNetworkSize(0);