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

pedestrian avoids sidewalk and takes primary #4657

Open
tatobox opened this issue Mar 25, 2024 · 8 comments
Open

pedestrian avoids sidewalk and takes primary #4657

tatobox opened this issue Mar 25, 2024 · 8 comments

Comments

@tatobox
Copy link

tatobox commented Mar 25, 2024

Hi everyone,
When I create a walking route the track goes on the road and does not follow the sidewalk.
In URL just a short example but it happens often. Is this a problem that needs to be corrected in iD Editor or a routing problem in Valhalla?
With OSMAnd on iOS the routing is correct
https://valhalla.openstreetmap.de/directions?profile=pedestrian&wps=11.325772404670715%2C44.4969071020134%2C11.327086687088014%2C44.497898125113466
It should look like the blue line in the screenshot.

@nilsnolde
Copy link
Member

With OSMAnd on iOS the routing is correct

then it's likely ok connected (unless osmand (they're still using their own routing engine?!) does some connectivity tricks).

next thing to look at would be how well our preference for sidewalks works. your suggested path might be a bit longer?

@nilsnolde
Copy link
Member

wtf github, can't click on the link, it mangles the URL somehow to https://github.com/valhalla/valhalla/issues/url 🙄

@nilsnolde
Copy link
Member

maybe we have an issue with "unmarked" crossings? this here routes just fine:
https://valhalla.openstreetmap.de/directions?profile=pedestrian&wps=11.326072812080383%2C44.496884143749696%2C11.327290534973145%2C44.49738157077296

but as soon as you have to traverse this crossing, it takes the primary (!): https://www.openstreetmap.org/way/1169674507

@nilsnolde nilsnolde changed the title Routing issue? pedestrian avoids sidewalk and takes primary Mar 25, 2024
@nilsnolde
Copy link
Member

yeah, real quick look and seems we don't treat those crossing as a sidewalk anymore which we probably should. because then it'd probably be preferred.

ref lua:

valhalla/lua/graph.lua

Lines 1506 to 1511 in 962719a

elseif (kv["highway"] == "footway" and kv["footway"] == "sidewalk") then
use = 24
elseif (kv["highway"] == "footway" and kv["footway"] == "crossing") then
use = 32
elseif kv["highway"] == "footway" then
use = 25

pbfparser:

case Use::kPedestrianCrossing:
way_.set_use(Use::kPedestrianCrossing);
break;

that Use::kPedestrianCrossing is only used in narration, but never in costing, only kFootway and kSidewalk are:

if (edge->use() == Use::kFootway || edge->use() == Use::kSidewalk) {
factor *= walkway_factor_;
} else if (edge->use() == Use::kAlley) {

any opinions on this @gknisely @dnesbitt61 ?

@tatobox
Copy link
Author

tatobox commented Mar 25, 2024

maybe we have an issue with "unmarked" crossings? this here routes just fine: https://valhalla.openstreetmap.de/directions?profile=pedestrian&wps=11.326072812080383%2C44.496884143749696%2C11.327290534973145%2C44.49738157077296

but as soon as you have to traverse this crossing, it takes the primary (!): https://www.openstreetmap.org/way/1169674507

Probably yes.
Just to give another example, from a little further away, in "Via del Carso" avoid the crossing and go on the road

https://valhalla.openstreetmap.de/directions?profile=pedestrian&wps=11.322559118270876%2C44.49704102503823%2C11.327118873596191%2C44.49790960404683

@tatobox
Copy link
Author

tatobox commented Mar 25, 2024

However, if I look better on iD, the "Via del Carso" crossing is a "marked" crossing but it still goes on the road

@nilsnolde
Copy link
Member

Yeah I could imagine that there’s quite a few connectivity issues with sidewalks in OSM. It’s also hard business on busy intersections.

At some point someone will look at this, it’s pretty annoying when it doesn’t use the nice sidewalks that exist.

@tatobox
Copy link
Author

tatobox commented Mar 26, 2024

OSMAnd works perfectly.

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

No branches or pull requests

2 participants