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.91k stars 951 forks source link

Cycling route avoids cycleway:right=lane and cycleway=opposite_track #3928

Open starsep opened 1 year ago

starsep commented 1 year ago

Cycling route avoids cycleway:right=lane Example route https://www.openstreetmap.org/directions?engine=graphhopper_bicycle&route=52.22974%2C20.98327%3B52.23686%2C21.01753 (52.22974, 20.98327) -> (52.23686, 21.01753) OSRM/GraphHopper also find slower route with 2 additional traffic lights.

I see no logic for cycleway=lane in https://github.com/organicmaps/organicmaps/blob/master/routing_common/bicycle_model.cpp

vng commented 1 year ago

Did you try to build route on latest data? https://github.com/organicmaps/organicmaps/blob/master/generator/osm2type.cpp#L751

Screenshot 2022-11-20 at 19 34 17
starsep commented 1 year ago

Yes, sorry for not posting the screenshot. This one is slower one. It crosses from south side to north and back. I expected to stick to the south side all the time and use cycleway lane instead of dedicated cycleway

vng commented 1 year ago

Dedicated highway=cycleway has better priority than cycleway=* (or bicycle=yes). We will add crossing/traffic_lights penalty someday.

BTW, Graphhoper with your link makes the same route.

Altonss commented 1 year ago

Cycling route avoids cycleway:right=lane

I noticed cycling route also avoids cycleway:left = opposite_track

Edit: on osm.org only OSMR bike routing gets it right and following the wiki https://wiki.openstreetmap.org/wiki/Key:cycleway#Cycle_tracks this doesn't seem to be a recommended tagging scheme (but it would be great if OM could handle it better nonetheless).

vng commented 1 year ago

@Altonss Do you have any example? cycleway:left=* should always work (except no, use_sidepath, separate).

Altonss commented 1 year ago

@Altonss Do you have any example? cycleway:left=* should always work (except no, use_sidepath, separate).

There is this example: https://www.openstreetmap.org/directions?engine=graphhopper_bicycle&route=48.76634%2C6.12736%3B48.76511%2C6.12480 which works on osm.org bike routing with OSMR, GraphHopper and Valhalla, but doesn't work in OM

pastk commented 1 week ago

Dedicated highway=cycleway has better priority than cycleway=* (or bicycle=yes). We will add crossing/traffic_lights penalty someday.

BTW, Graphhoper with your link makes the same route.

Interestingly, OM prefers the south side now, while OSM routers switch to north cycleway still.

image

pastk commented 1 week ago

I noticed cycling route also avoids cycleway:left = opposite_track

Edit: on osm.org only OSMR bike routing gets it right and following the wiki https://wiki.openstreetmap.org/wiki/Key:cycleway#Cycle_tracks this doesn't seem to be a recommended tagging scheme (but it would be great if OM could handle it better nonetheless).

There is this example: https://www.openstreetmap.org/directions?engine=graphhopper_bicycle&route=48.76634%2C6.12736%3B48.76511%2C6.12480 which works on osm.org bike routing with OSMR, GraphHopper and Valhalla, but doesn't work in OM

Doesn't work in OM as OM thinks its one-way only street.

image

But given this tag is deprecated and only ~700 usages left (https://wiki.openstreetmap.org/wiki/Tag:cycleway%3Dopposite_track) it doesn't make sense to support it.

Could you please update the mapping with recommended schema and then we'll see if it works?