mapbox / mapbox-java

The Mapbox Java SDK – Java wrappers around Mapbox APIs and other location data
https://docs.mapbox.com/android/java/overview/
MIT License
424 stars 120 forks source link

Walking profile with walkway/alleyBias=1 create 3x longer routes than expected #1159

Open ulnn opened 4 years ago

ulnn commented 4 years ago

Hi all-

I am using turn-by-turn navigation with the Mapbox DirectionsAPI on Android and explore strange routing behavior when selecting the "walking" profile. Some routes are 3x longer than a comparable cycling route, especially highway=path and =footway seem to be avoided at all cost. I also pass walkwaybias=1 and alleybias=1 but it does not change the behavior.

An example here:

  1. Walking Route: https://codepen.io/ulnn/pen/RwrYbja
  2. Cycling Route (better route, but still mediocre): https://codepen.io/ulnn/pen/eYJLOKb
  3. Best Route (desired outcome): https://www.openstreetmap.org/directions?engine=graphhopper_foot&route=50.13981%2C8.69852%3B50.13825%2C8.69507#map=18/50.13921/8.69745

Any idea?

Guardiola31337 commented 4 years ago

@mapbox/navigation-api @danpat @danpaz Could you take a quick look at this when you have a chance 🙏?

I'm going ahead and transfer this into https://github.com/mapbox/mapbox-java as it's not directly an issue coming from the Navigation SDK.

@mapbox/navigation-api @danpat @danpaz If necessary, feel free to transfer it to somewhere else so you can keep track of it.

ulnn commented 4 years ago

maybe it is also because a connecting footway is not explicitly set to "yes"? But the routing algo should also deal with it if there is a "paved way" element, or?

ulnn commented 4 years ago

We got some advice from Mapbox support to add the tag foot=yes.

image

But....we have applied the suggested changes to the OSM dataset and it got moderated.

The comment for the moderation was: "For paths in OSM, there are some default values if there are no explicit other rights (https://wiki.osm.org/wiki/OSM_tags_for_routing/Access_restrictions#Germany). Therefore in this situation, it is unnecessary to add foot=yes."

So as far as we see this, the Mapbox DirectsionAPI routing algorithm requires a different configuration to run "smoothly" in Germany and the algorithm should - although this is not explicitly foot=yes tagged - consider this as a valid path.

What do you think? Many thanks in advance.