Repository navigation
Conversation
…bicycle types
Make sure that highway=path + way.hasTag("bicycle", intendedValues) results in the same highway speed as for a cycleway. See graphhopper#634.
|
Thanks! As this relates to the other issue ... shouldn't we use the high speed of 18km/h only if the path is also tagged as bicycle=designated? Just path doesn't look this fast e.g. see the wiki images Or tags like |
…d as bicycle=designated.
|
Now I included your suggestion "shouldn't we use the high speed of 18km/h only if the path is also tagged as bicycle=designated?" I believe that handling of smoothness is another more complex issue, which better should be handled in a separated commit. |
|
@karussell Can you please check this PR? It seems that we forgot about it. |
|
Not forgotten just too many things to do. |
| way.setTag("highway", "cycleway"); | ||
| assertEquals(18, encoder.getSpeed(way)); | ||
| assertPriority(VERY_NICE.getValue(), way); | ||
| int cyclewayspeed = encoder.getSpeed(way); |
There was a problem hiding this comment.
there is no assert here - is this intended?
There was a problem hiding this comment.
and a check is missing where highway=path without another tag resulting in the path speed=12 ?
There was a problem hiding this comment.
Please check the whole code and not only the diff. I suppose you are missing an assert after the assignment to cyclewayspeed, but I'm just fetching it and use it in further tests below.
|
@ratrun would mind looking into this here & and my questions :) ? I'll then try to merge this. |
|
The cycelway speed for path is taken only if in addition one of the intendedValues is set. |
What do you mean here? And would you mind to have a look into the questions (see also in comments above):
I really would like to get this merged :) |
Here I meant line 441: |
| way.setTag("surface", "paved"); | ||
| assertEquals(PUSHING_SECTION_SPEED * 2, encoder.getSpeed(way)); | ||
|
|
||
| // Pushing section Ok !! |
There was a problem hiding this comment.
btw: do you know what this comment means :) ?
There was a problem hiding this comment.
Sorry, I forgot. I believe // Pushing section Ok !!meant that the next test
way.setTag("highway", "path");
way.setTag("surface", "paved");
is fine in case that the result is that it is a pushing section. Please delete the comment
|
Made some minor edits, added the small test case and squashed, see the change which I intend to merge soon, here: https://github.com/graphhopper/graphhopper/compare/issue_635 |
|
The only minor question left is: why do we have 'get off the bike', 'cycleway' and 'way'? What purpose does 'way' have - shouldn't it be empty instead? E.g. here: https://github.com/graphhopper/graphhopper/compare/issue_635#diff-2b379d5a5f4eeda50f6fe80e2e28daa9R141 |
The original intention was to make the instructions more clear from a bike riders perspective and give hints what kind of way to seek and expect. I think that I would not try this again if I had to re-implement that idea. So if you don't like the idea please delete it. |
I like the information about 'getting off the bike' and 'cycleway', although the API should be a bit different in the future ('more separate') but for now we keep this. What I mean is that 'way' is not informative (compared to get off the bike and cycleway) and I would leave it empty instead? |
Yes this is fine. Maybe the problem here was that I'm was thinking about the German term "Weg" or colloquialism "Wegerl", which means something small. The English term way is probably not 1:1 equivivalent. |
|
Maybe we should translate explicitely 'narrow/small way/road/path'? I'll set it to 'small way' for now ... |
|
Thanks again for this contribution and sorry for the delay! |
…bicycle types
Make sure that highway=path + way.hasTag("bicycle", intendedValues) results in the same highway speed as for a cycleway. See #634.