Repository navigation
Add support for bike mtb:scale accessibility - #3048
Conversation
|
Why can't we use |
Until now I only de-priorities encoded values and never blocked it. Would total blocking be possible via a custom rule, e.g. by assigning a speed of 0? Additionally the |
Usually via a priority of 0.
It would be nice if we can move it out of the parser too as it is already partially. As you can see with the mtb scale, the special handling with |
Thank you. OK, I will try it. But what is the best way to test if a modified custom rule actually works as intended? Do I need to find and test this with real world examples? |
You can also load and test a custom model in the unit tests - see the utility method GHUtility.loadCustomModelFromJar and where/how it is used in tests (e.g. testHikePrivate). |
|
Now I moved the sac_sale and mtb:scale handling for bicycles to the custom models. The PR therefore became much more complex then before. But now I think I understand what you mean when you say that the long term goal is to move the weighting completely into the custom models. |
# Conflicts: # web/src/test/java/com/graphhopper/application/resources/RouteResourceCustomModelTest.java
|
@karussell Did you miss this PR? Usually you responded very fast, but lately a couple of PRs are hanging around. I hope you are doing fine? |
|
Thanks you for your work :) This looks good, but will need to review it a bit deeper. Did you already have time to test it for some real world cases? If yes, can you point me to one hike and one mtb case where this PR is important and makes a difference? |
Yes, for mtb:scale=2, you find the example with screenshots of the result in #3049 . For the sake of completeness here is the example link. The result for sac_scale should be the same compared to before as only the implementation has changed. Here is an example I found via overpass |
|
Should we really hard exclude those ways for |
I'm undecided about this. What would you suggest? Is |
|
Yes, something like this. But maybe we keep it as you suggested for now and if there are problems with this fix this according to real world examples? |
Given the long time we didn't consider the tag |
|
Thanks for this change! |
…ed for bicycles or paved Ported from the climbfinder fork on 9.x (4bbad2c). Upstream removed sac_scale from the bike access parsers in graphhopper#3048 and blocks hike_rating > 1 in its custom models instead. Our exception, a way that carries any bicycle tag stays open, cannot be written as a custom model condition, so RacingBikeAccessParser keeps it as an access rule. The probe against the production jar shows no sac_scale difference left; the remaining differences are bridleway and bicycle=destination, both upstream changes (see the PR).
Triggered by the discussion in https://community.openstreetmap.org/t/consuming-highway-path-take-2/118175 I detected that currently we do not support the
mtb:scaletag for the bicycles yet at all. This PR adds support for the detection of the accessibility. This does make sense in order to increase the safety of the suggested routes.I was thinking about adding additional support for control of the priority detection, but came to the conclusion that this is not necessary as according to taginfo we are already handling the most often combined tags. Handling the prioritization stuff twice does not make sense.