You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
In determining the priority rating, we seem to ignore steps so that the lower average speed is the only incentive to choose a different route. As these sections tend to be small, a 2km/h speed limit might not be enough to force a different routing decision.
I just skimmed over the code but this part looks a bit sketchy:
I'm pretty sure that the problem comes from the bicycle=designated tagging of the 70m steps. I added a test for it:
@Test
public void testSteps() {
ReaderWay way = new ReaderWay(1);
way.setTag("highway", "steps");
assertPriorityAndSpeed(SLIGHT_AVOID, 2, way);
way.setTag("bicycle", "designated");
assertPriorityAndSpeed(VERY_NICE, 18, way);
}
We need to apply a change such that the second test does not pass any longer. I'm going to provide a PR and also change the CYCLEWAY_SPEED code issue mentioned by @otbutz.
I'm pretty sure that the problem comes from the bicycle=designated tagging of the 70m steps.
That one screams "tagging mistake". The steps - if they even exist - lead up to a cycleway. Maybe an artifact from splitting the way?
I would argue that we should limit the speed on steps in any case. You can't carry your bike any faster even if the way would be correctly tagged with bicycle:designated (which is highly unlikely).
The PR fixes the originally discovered case and by chance also the MTB example from @mprins. I changed the speed for steps for the MTB profile because we should assume that steps are pushing sections even for MTBs. And why would somebody push the bicycle on a MTB faster compared to the other two bike profiles?
@karussell: I also had a looks on your other real world examples but do not quite understand the problems these should illustrate.
I played around with the priority classification for highway=steps using the other real world examples above from @karussell. Even the worst classification of the steps with REACH_DESTINATION only solves example 3 and 4, but not 1 and 2. The problem with the example 3 and 4 is that the highway=steps segment is too short. As this will be the case with steps in most circumstances I think that we should implement the priorisation with assigning the REACH_DESTINATION. I'm going to update the PR accordingly.
Yeah, this is a good examples where we want to accept steps. Tricky :)
So for now can you try to use a higher PriorityCode and then we have to accept the failure of some of the above cases until we have a better idea like an absolute offset of seconds that would make avoiding short steps possible (and would help for other cases like ferries too)
After some fine tuning and running into further failed testcases in Monaco I consider the priority classification "BAD" as the best compromise for highway=steps. Please check the update in PR #2804.
Activity
otbutz commentedon Apr 24, 2023
In determining the priority rating, we seem to ignore steps so that the lower average speed is the only incentive to choose a different route. As these sections tend to be small, a 2km/h speed limit might not be enough to force a different routing decision.
I just skimmed over the code but this part looks a bit sketchy:
graphhopper/core/src/main/java/com/graphhopper/routing/util/parsers/BikeCommonAverageSpeedParser.java
Lines 201 to 204 in d77faa1
So if
speed == PUSHING_SECTION_SPEEDwe wouldn't lower the limit forhighway:stepsfrom 4km/h to 2km/h?This comment referencing #634 also seems to be outdated?
graphhopper/core/src/main/java/com/graphhopper/routing/util/parsers/BikeCommonAverageSpeedParser.java
Lines 76 to 79 in d77faa1
Basically we still do this, but the logic for it is further down, which makes the comment and the pseudo-constant pretty useless.
ratrun commentedon Apr 24, 2023
I'm pretty sure that the problem comes from the
bicycle=designatedtagging of the 70msteps. I added a test for it:We need to apply a change such that the second test does not pass any longer. I'm going to provide a PR and also change the
CYCLEWAY_SPEEDcode issue mentioned by @otbutz.otbutz commentedon Apr 24, 2023
That one screams "tagging mistake". The steps - if they even exist - lead up to a cycleway. Maybe an artifact from splitting the way?
I would argue that we should limit the speed on steps in any case. You can't carry your bike any faster even if the way would be correctly tagged with
bicycle:designated(which is highly unlikely).otbutz commentedon Apr 24, 2023
Ordnance Survey and Google Maps mark the road to Foxhills Road as blocked for bicycles:
https://explore.osmaps.com/?lat=52.477522&lon=-2.166876&zoom=16.8534&style=Standard&type=2d&overlays=os-ncn-layer&placesCategory=
https://www.google.com/maps/dir/52.4792896,-2.1669795/52.4759287,-2.1656178/@52.4766774,-2.1670924,965m/data=!3m2!1e3!4b1!4m2!4m1!3e1!5m1!1e3
Another indicator that the tagging is not based on local knowledge and somebody was just tracing satellite imagery.
mprins commentedon Apr 24, 2023
while you are looking at this; MTB seems to prefer going down the stairs... (that are too steep to ride)
ratrun commentedon Apr 24, 2023
The PR fixes the originally discovered case and by chance also the MTB example from @mprins. I changed the speed for steps for the MTB profile because we should assume that steps are pushing sections even for MTBs. And why would somebody push the bicycle on a MTB faster compared to the other two bike profiles?
@karussell: I also had a looks on your other real world examples but do not quite understand the problems these should illustrate.
karussell commentedon Apr 24, 2023
Yeah, let's ignore this original example as this seems to be a tagging problem.
Sorry, the first one was an incorrect link. This is the correct and uses a step although it could avoid steps with a small detour?
The second one uses steps and could avoid them but footway probably makes it harder to choose for GH.
The third one again uses steps for no reason and could use this tiny detour again a footway but with allowed bike.
The fourth one again uses steps to avoid the footway alternative.
(see the route hints in the route result to highlight steps or footways easily and quickly)
Going down the steps a real MTB rider could avoid getting of the bike ;)
De-prioritise steps for bicycles, fixes graphhopper#2803 original dis…
ratrun commentedon Apr 25, 2023
I played around with the priority classification for
highway=stepsusing the other real world examples above from @karussell. Even the worst classification of the steps withREACH_DESTINATIONonly solves example 3 and 4, but not 1 and 2. The problem with the example 3 and 4 is that thehighway=stepssegment is too short. As this will be the case with steps in most circumstances I think that we should implement the priorisation with assigning theREACH_DESTINATION. I'm going to update the PR accordingly.ratrun commentedon Apr 25, 2023
With the change for assigning

highway=stepsto priorityREACH_DESTINATIONour built in Krems testcase changes significantly frominto
I'm not sure if this significant increase in the distance from 6.9km to 9.3km is worth the avoidance of 17 meters steps. What do you think?
karussell commentedon Apr 25, 2023
Yeah, this is a good examples where we want to accept steps. Tricky :)
So for now can you try to use a higher PriorityCode and then we have to accept the failure of some of the above cases until we have a better idea like an absolute offset of seconds that would make avoiding short steps possible (and would help for other cases like ferries too)
ratrun commentedon Apr 26, 2023
After some fine tuning and running into further failed testcases in Monaco I consider the priority classification "BAD" as the best compromise for
highway=steps. Please check the update in PR #2804.De-prioritise steps for bicycles (#2804)
[RSPS-1174] : Upgrade gh7 (#35)
[RSPS-1546] Upgrade to GH8 (#38)