Skip to content

Change speed for highway=path into the cycleway speed for all … - #635

Closed
ratrun wants to merge 2 commits into
graphhopper:masterfrom
ratrun:issue634
Closed

ratrun wants to merge 2 commits into
graphhopper:masterfrom
ratrun:issue634

Conversation

@ratrun

@ratrun ratrun commented Jan 7, 2016

Copy link
Copy Markdown
Contributor

…bicycle types

Make sure that highway=path + way.hasTag("bicycle", intendedValues) results in the same highway speed as for a cycleway. See #634.

…bicycle types

Make sure that highway=path + way.hasTag("bicycle", intendedValues) results in the same highway speed as for a cycleway. See graphhopper#634.
@karussell

Copy link
Copy Markdown
Member

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 smoothness=intermediate|good|excellent or surface could upgrade the speed too.

@ratrun

ratrun commented Jan 29, 2016

Copy link
Copy Markdown
Contributor Author

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.

@ratrun

ratrun commented Feb 22, 2016

Copy link
Copy Markdown
Contributor Author

@karussell Can you please check this PR? It seems that we forgot about it.

@karussell

Copy link
Copy Markdown
Member

Not forgotten just too many things to do.

@karussell karussell changed the title Change highwayspeed for highway=path into the cycleway speed for all … Change speed for highway=path into the cycleway speed for all … Apr 8, 2016
way.setTag("highway", "cycleway");
assertEquals(18, encoder.getSpeed(way));
assertPriority(VERY_NICE.getValue(), way);
int cyclewayspeed = encoder.getSpeed(way);

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

there is no assert here - is this intended?

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

and a check is missing where highway=path without another tag resulting in the path speed=12 ?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

@karussell

karussell commented Apr 27, 2016 •

Copy link
Copy Markdown
Member

@ratrun would mind looking into this here & and my questions :) ? I'll then try to merge this.

@ratrun

ratrun commented May 1, 2016

Copy link
Copy Markdown
Contributor Author

The cycelway speed for path is taken only if in addition one of the intendedValues is set.

@karussell

karussell commented May 12, 2016 •

Copy link
Copy Markdown
Member

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):

why are they equal? Shouldn't they be different and we should use the cycleway speed instead when highway=path and designated?
there is no assert here - is this intended?
and a check is missing where highway=path without another tag resulting in the path speed=12 ?

I really would like to get this merged :)

@ratrun

ratrun commented May 12, 2016 •

Copy link
Copy Markdown
Contributor Author

What do you mean here? And would you mind to have a look into the questions (see also in comments above):

Here I meant line 441:

                   if (way.hasTag("bicycle", "designated") || way.hasTag("bicycle", "official"))
                      speed = getHighwaySpeed("cycleway");

way.setTag("surface", "paved");
assertEquals(PUSHING_SECTION_SPEED * 2, encoder.getSpeed(way));

// Pushing section Ok !!

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

btw: do you know what this comment means :) ?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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

@karussell

Copy link
Copy Markdown
Member

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

@karussell

karussell commented May 12, 2016 •

Copy link
Copy Markdown
Member

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

@ratrun

ratrun commented May 12, 2016

Copy link
Copy Markdown
Contributor Author

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?

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.

@karussell

karussell commented May 12, 2016 •

Copy link
Copy Markdown
Member

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?

@ratrun

ratrun commented May 13, 2016

Copy link
Copy Markdown
Contributor Author

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.

@karussell

karussell commented May 13, 2016 •

Copy link
Copy Markdown
Member

Maybe we should translate explicitely 'narrow/small way/road/path'? I'll set it to 'small way' for now ...

@karussell karussell added this to the 0.7 milestone May 13, 2016
karussell pushed a commit that referenced this pull request May 13, 2016
@karussell karussell closed this May 13, 2016
@karussell

Copy link
Copy Markdown
Member

Thanks again for this contribution and sorry for the delay!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants