Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Allow routing cars in pedestrian streets #2940

Open
wants to merge 8 commits into
base: master
Choose a base branch
from

Conversation

michaelkrog
Copy link

@michaelkrog michaelkrog commented Feb 12, 2024

This PR fixes #2888 by adding support for importing pedestrian streets in the car profile - allowing routing cars in pedestrian streets that is tagged with vehicles allowed in pedestrian streets.

Because #733 and #374 are open issues, routes through pedestrian streets might occur when not legal. When they are fixed this should work fine.

Adding specific/correct legal_default_speeds for pedestrian streets will ensure that routing will most often be routed using other ways.

@karussell
Copy link
Member

karussell commented Mar 1, 2024

A way with highway=pedestrian that is by default accessible should be avoided as this is often not properly tagged and I would only allow cars on pedestrian roads if it is explicitly tagged. (Furthermore the access "customers-only" should not be allowed by default for car.)

@michaelkrog Can you have a look if this branch fixes the problems you saw in #2888?

@michaelkrog
Copy link
Author

michaelkrog commented Mar 8, 2024

@karussell Yeah. It seems to give me the same results as I had with my PR (but this is obviously improved only allow those explicit tagged)

Issue that remains as stated above is that routing through pedestrian streets in city centers that is tagged correctly (fx. motor_vehicle=destination; motor_vehicle:conditional=no @ (11:00-04:00)) may be routed via shortcuts in the pedestrian streets instead of around the pedestrian streets.

Example of wrongful short cut route across city center using the changes in issue_2888 branch

Skærmbillede 2024-03-08 kl  11 46 34

Example of correct route across city center using production version

Link
Skærmbillede 2024-03-08 kl  11 54 44

Example of correct routing into pedestrian streets using the changes in issue_2888 branch

Skærmbillede 2024-03-08 kl  11 55 42

Example of wrongful routing into pedestrian streets using production version

Link
Skærmbillede 2024-03-08 kl  11 56 02

@otbutz
Copy link
Contributor

otbutz commented Mar 8, 2024

@michaelkrog not sure if I can follow. So in the branch created by @karussell, the accessibility of the ways is evaluated correctly, but the routing incorrectly favors them instead of the faster detour?

Maybe the average speed estimation is a bit off? 5ae8297 only touches the access bits but doesn't introduce a default speed value. The fallback of 10km/h might be too high? Should we treat it like a living_street and assume 5km/h aka walking speed?

@michaelkrog
Copy link
Author

michaelkrog commented Mar 8, 2024

@otbutz Yes and no.

As I understand it, graphhopper does not support motor_vehicle=destination for car. In the shown examples, the pedestrian streets are tagged with motor_vehicle=destination; maxspeed=15, and the branch by @karussell still uses the pedestrian streets to cross the city center. The optimal would be to only route using the pedestrian streets when the destination is in a pedestrian street.

Changing the default speed for pedestrian streets (as you mention) may help it to use normal highways when destination is not in the pedestrian streets. I did that in my own PR(this PR), but the result is the same. But maybe that is because the pedestrians streets in this example are tagged with maxspeed=15 and then overrides the default walking speed?

BTW: In the example images above I referred to this PR in the last example by mistake. I have corrected it now. The examples are only between the branch created by @karussell and production

@otbutz
Copy link
Contributor

otbutz commented Mar 8, 2024

But maybe that is because the pedestrians streets in this example are tagged with maxspeed=15 and then overrides the default walking speed?

An explicitly tagged value would override the default. But I'd still aim for a rather pessimistic assumption if no max_speed tag is present, just to be sure.

As I understand it, graphhopper does not support motor_vehicle=destination for car.

We take the road access into account as far as I'm aware:

double time = edgeState.getDistance() / speed * SPEED_CONV;
if (roadAccessEnc != null) {
RoadAccess access = edgeState.get(roadAccessEnc);
if (access == RoadAccess.DESTINATION)
time *= destinationPenalty;
else if (access == RoadAccess.PRIVATE)
time *= privatePenalty;
}

Could you check if the parser yields DESTINATION for the relevant sections?

@karussell
Copy link
Member

karussell commented Mar 19, 2024

As I understand it, graphhopper does not support motor_vehicle=destination for car.

We do avoid motor_vehicle=destination in production via a custom model with road_access == DESTINATION, so this mostly works, but leads to some artefacts shown in my last comment there. The same comment also describes a solution which we should probably implement before allowing access to pedestrian streets as opening up pedestrian streets will very likely make these artefacts more frequent.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Pedestrian street with vehicles allowed not routable by car profile
3 participants