organicmaps / organicmaps

🍃 Organic Maps is a free Android & iOS offline maps app for travelers, tourists, hikers, and cyclists. It uses crowd-sourced OpenStreetMap data and is developed with love by MapsWithMe (MapsMe) founders and our community. No ads, no tracking, no data collection, no crapware. Please donate to support the development!
https://organicmaps.app
Apache License 2.0
9.89k stars 952 forks source link

Bike navigation rankes streets too high #2522

Closed simonschaufi closed 2 weeks ago

simonschaufi commented 2 years ago

I use this app for bike navigation quite a lot but I often switch to walking navigation as the bike navigation is often not the most convenient way and ignores even official bike ways and instead sends me to big roads.

Screenshot_20220505-113707_Organic Maps Which should be the same like: Screenshot_20220505-113730_Organic Maps

This is the route in Maps.me:

Screenshot_20220506-000437_MAPSME

This is the route in Komoot:

photo_2022-05-28_23-28-57

Also not optimal as it also uses only big streets instead of field ways.

biodranik commented 2 years ago

Did you compare it with other apps? Is OSM data correct there? It would be easier for us if you share an OSM link to the wrong route, so we can quickly reproduce the issue.

Please report all found wrong routes with examples of good ones, then it will be easier for us to fix the algorithm.

simonschaufi commented 2 years ago

These are the routes:

and for comparison the one from Google: https://www.google.de/maps/dir/Rastatter+Stra%C3%9Fe+50,+Karlsruhe/Epplesee,+76287+Rheinstetten/@48.9748759,8.3459009,14z/data=!3m1!4b1!4m14!4m13!1m5!1m1!1s0x479705e12e723bc9:0x5afb1a1bbcbdcc63!2m2!1d8.4036298!2d48.9734004!1m5!1m1!1s0x4797040b218ff77d:0x92ded19145cf769e!2m2!1d8.3235399!2d48.9655289!3e1

Does this help? The routes in the app are totally different from the ones from OSM.

RedAuburn commented 2 years ago

Definite +1 for this, an option to only route (when possible) with dedicated bike lanes would be nice too

vng commented 2 years ago

@endim8 If the app skips dedicated/designated bike roads - it's an obvious bug. Please, attach the examples here, will investigate.

vng commented 2 years ago

@simonschaufi The desired route has highway=track Not sure, but is next set of tags ok for bicycle routing?

highway=track
motor_vehicle=forestry
name=Pirschweg
smoothness=intermediate
surface=fine_gravel
tracktype=grade2

The app assumes 8kmh speed for this road, at the same time has obviously bigger speed via "big roads".

Possible solution here is to introduce more bicycle profiles like fastest, nicest/quite.

simonschaufi commented 2 years ago

Many tracks which are used for walking can also be easily used by bikes except some really rough ways through fields but as a biker I rarely find ways which are only useful for walking. Exceptions are usually in the fields or ways in the forest but these ways I have in the screenshot could even be used by a car even though often not allowed. So the whole algorithm is not optimized for bikers.

Possible solution here is to introduce more bicycle profiles like fastest, nicest/quite.

Yes, that would be next level and would be also useful for cars (avoid highways...)

biodranik commented 2 years ago

@simonschaufi it would be helpful if you can make a list of OSM tags that actually allow cycling, so we can tune our algorithms.

simonschaufi commented 2 years ago

@biodranik can you tell me how to do that as I'm just a user of the app and don't know much about internals of OSM?

Is there no public data available of "official bike ways" which are marked with a green arrow in Germany? I wonder how other platforms like Komoot for example do their routing.

biodranik commented 2 years ago

We're not bikers :) So if you help us to find answers to your good questions, it may save us a lot of time and help us to focus on development.

You can check the real roads in your country and how are they tagged in osm.org (there is a data layer there).

simonschaufi commented 2 years ago

I'm a developer myself and could maybe also understand the algorithm if you point me to the right file where this happens. The main question is: is the tagging in OSM bad or is your algorithm not optimal? Which tag does the road need in order to be chosen as a possible way? Where is the "switch" between pedestrians and bikers?

I have added a screenshot from Komoot to my initial post.

biodranik commented 2 years ago

At first, it's important to check the OSM data quality. If everything is tagged properly, and it is obvious for you that there is a mistake in the algorithm, then it's a bug. You can check routing_common/bicycle_model.cpp

simonschaufi commented 2 years ago

Here are some already (which I don't find in the bicycle_model.cpp but I hope that helps):

PS: I found a special type in OSM called "Bicycle Route". This can be used and should be rated high.

Bildschirmfoto vom 2022-05-29 00-05-00

vng commented 2 years ago

Simply increasing highway=track priority for bicycle is not a good fix, IMHO. Upcoming release makes this route, that uses designated bicycle paths and seems like its OK:

Screenshot 2022-07-24 at 11 44 22

We are working on alternative routes algorithm that will allow you to select best route for the user.

vng commented 2 years ago

I see a problem on this route here (48.96240, 8.33978):

Screenshot 2022-07-24 at 11 47 08

The app left designated bicycle highway=path and uses secondary/residential instead. Will investigate it.

vng commented 1 year ago

One more claim of ignoring track roads for bicycles: https://www.openstreetmap.org/directions?engine=graphhopper_bicycle&route=49.6461%2C8.6475%3B49.6624%2C8.6920#map=14/49.6540/8.6696

Let's try to increase track's weight, especially with tracktype=grade1/grade2. And it should be defined as unpaved_good (now have unpaved_bad).

vng commented 1 year ago

One more example: (53.2876678, 8.11889789) -> (53.2122689, 8.20143976)

pastk commented 3 weeks ago

One more claim of ignoring track roads for bicycles: https://www.openstreetmap.org/directions?engine=graphhopper_bicycle&route=49.6461%2C8.6475%3B49.6624%2C8.6920#map=14/49.6540/8.6696

Let's try to increase track's weight, especially with tracktype=grade1/grade2. And it should be defined as unpaved_good (now have unpaved_bad).

Did you adjust it? Is it fixed now?

simonschaufi commented 2 weeks ago

It is indeed better with the release of 2024.10.08. I'm closing it now and will report further issues in a new issue. Thank you very much!