Skip to content

Easy way to define route preferences for bike through API and web ui #88

Closed

Description

@grinapo

This is just preference setting I guess, but noting my observation.

I know there are two kinds of cyclists: one goes for whatever the shortest no matter it's going through a pit of crocodiles and the others possibly prefer routes with less crazy altitude variance, lower traffic, paved ways, so in summary designated cycleways. Myself would prefer going 20% longer on a paved cycleway instead of pedaling in the dirt and mud. ;-)
Possibly a difference between bicycle and mtb. ;-)
Right not GH doesn't seem to prefer cycleway for cyclists.

Activity

  1. karussell commented on Jul 23, 2013

    @karussell
    Member

    Creating a profile won't be (easily) possible for the used Contraction Hierarchy algorithm on the world wide map. But still it would be very useful for the none-CH case. At the moment you'd have to tweak the code to achieve that.

    So, I'll rephrase the issue a bit ...

  2. NopMap commented on Jul 23, 2013

    @NopMap
    Contributor

    Basically you would need 3 different variants of the BikeFlagEncoder

    • Trekking bike: Prefers a comfortable way with good speed on roads and tracks, avoids unneccessary inclines
    • MTB prefers difficult, interesting routes, avoids pavement
    • racing bike: Limited to paved surfaces in good condition
  3. karussell commented on Jul 23, 2013

    @karussell
    Member

    Yes. This would be one step in the right direction. Later on we could provide a personalized profile where one could avoid stairs in-between or certain highway or surface types. Or increase the 'safety' of a route via a parameter.

  4. NopMap commented on Jul 23, 2013

    @NopMap
    Contributor

    For finer profiles you could

    • encode the different criteria into the flags seperately
    • inform the client which options are offered by a particular encoder (lets call it ProfileOptions)
    • create a Profile object which is included in a GHRequest and handed to the WeightCalc classes so they can do their calculation according to the profile settings.

    I plan to implement something like this for my horse navigation. Might be worthwhile to do it in a general way.

  5. grinapo commented on Jul 23, 2013

    @grinapo
    Author

    This is actually a very important point at routing engines: one of the biggest problems are the preference differences between alternative uses. I try to show some samples (from experience):

    • car navigation where one prefers less turns (eg. trucks / hgv)
    • car/bike allowing or rejecting ferries, toll roads
    • bike preferring or rejecting cycleway, ferry, primary/secondary roads, dirt tracks (eg. anything below grade3), scary inclines (which I know isn't strictly openstreetmap but SRTM question, but worths mentioning)
    • anyone actually rejecting ferries (they may be seasonal, intermittent, expensive, ...)
    • anyone giving more positive or negative weights to features, like tracktype, smoothness, inclines, traffic_lights, level crossings, turns in general or U-turns in particular, ...
    • I'm not sure access tag family is handled fully (lots of tricks were revealed using osmand)
    • yournavigation.org have interesting preference sets (like moped and trucks), there could be learned from :) Same goes with Lonvia's skating map :-) And of course there are the riders from Germany! ;-)
    • blocked roads / areas (by the local user)
    • preferred roads; this is an interesting feature in googlemaps (for example) where one can flag roads as preferred or to avoid, which is basically a way to skew the route planner towards "usual" or "preferred" routes. I was thinking how could we implement such an idea in the OSM database but I see no general solution to prevent entries appearing without justification which would make it almost impossible to review/verify/fix these. Still, local users may mark ways preferred or avoid, which would give them positive/negative weights. (It is the problem of the application to keep track of these in view of changing node/way id's... Interesting problem anyway.)
  6. karussell commented on Jan 8, 2014

    @karussell
    Member

    For this feature we already have the different bike encoders nows via #138 and the route relation stuff in #132.

    For this feature CH makes no sense but in order to support none-CH we still need:

    • to store the different kinds of roads into the edge info. For this see also Annotations for the graph and route #80
    • make this edge information easier accessible. E.g. encoder.getBit(edgeState.getFlags, index), already done via encoder.getDouble/Long ...
    • a possibility to access this through compiled JavaScript to allow nearly arbitrary code
  7. karussell commented on Oct 28, 2015

    @karussell
    Member

    Closing in favor of #193

  8. added a commit that references this issue on Apr 11, 2018
  9. added a commit that references this issue on Jan 7, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions