Osrm-backend: Better safety penalties for the bike profile

Created on 10 May 2017  路  10Comments  路  Source: Project-OSRM/osrm-backend

Currently our safety penalty code is rather simplistic: Every major street is assumed to be more dangerous then a local street.

Instead we should also base the penalties on which kind of cycleway is used.

  • cycleway=lane No penalty even for major street
  • cycleway=shared_lane bonus on small road, only slight penalty on major road
  • highway=cycleway should get a slight bonus

/cc @almithani @danpat @emiltin

Profile

Most helpful comment

@perliedman it was just a side-note, that overall bike routing usability is a lot worse, if elevation is not taken into account. I've got elevation settled in my service.

All 10 comments

We should also make the safety penalty graduated. highway=primary, lanes=6 should have a higher penalty than highway=secondary, lanes=2.

If there's a way to have on-street parking tagged, we should consider that too, especially if there is no cycling lane.

might be useful to also consider maxspeed. in general the safety will depend on the speed cars go by - which is affected by a number of tags, like highway, maxspeed, maxspeed:forward/backward, surface, etc.

cycleway=track is better than nothing.

we also need to consider all the annoying directional cases, e.g. cycleway:left, cycleway:right and cycleway=opposite_track, etc.

parked cars makes cycling safe, if the parked cars are between you and the traffic.

no busses/trucks usually makes the road safer for cyclists.

this said, i think it worth considering how much we stress safety if the profile is still supposed to compute fastest bike route.

I think that giving a bonus to all cycleways would be a huge improvement, even without looking at # of lanes, traffic speed or types of traffic.

  • cycleway=track and highway=cycleway (aka separated bike lanes) are the most "desirable" from a cyclist perspective, and since they are separated from traffic, the traffic speed and # of lanes doesn't really matter that much.
  • cycleway=lane (aka marked bike lanes) are slightly less desirable than the above, but still WAY more desirable than a regular road
  • cycleway=shared_lane (aka sharrows or designated cycling streets) are less desirable than both the above, but still preferred over any regular road

RE: safety vs speed - if it helps the discussion, we are getting feedback right now that the current routes that use major roads for cycle directions are not really seen as "bike routes". In fact, the feedback says that bike routes should strongly prefer cycling features such as bike lanes and tracks.

For this reason, I think a huge improvement could be made by adjusting the bonuses and penalties on the cycleway tags.

i agree with most of the above, however, smaller roads in denmark without cycle tracks/lanes are usually just as safe as bigger roads with. for example, most residential streets in the suburbs don't have lanes/tracks, but since there is so little traffic they are considered quite safe. in fact most parents would sent their kids along such roads, instead of along bigger roads with bike tracks.

i think what's important here is to more clearly define what kind of bike routes the profile is suppose to produce. fastest bike route? what most adults would prefer when cycling to work? or when going for a ride on sundays?

I did myself a bike routing profile at https://github.com/FreemapSlovakia/freemap-routing/blob/master/oma-bicycle.lua

overall, it's very complicated (and without elevation data, the results are almost unusable in my hilly area)

things I stumbled upon, that were not mentioned above:

  • avoid roads with many route=bus ( #482 )
  • avoid crossing major roads without traffic lights (connected to #96 and #3862 )
  • prefer ways which are parts of bike relations ( #482 )
  • (avoid roads close to major roads and prefer roads in the forest)
  • prefer minor roads with traffic_calming things on it
  • elevation gains

@MichalPP off topic, but regarding elevation, I've had good results with this simplistic approach for cycling: http://www.liedman.net/2015/04/13/add-elevation-data-to-osrm/ ; feel free to contact me if you want more information on this.

also osrm now has build-in methods to read raster data, which can be used for e.g. elevation data

cc @utack - we had the conversation about lanes for safety penalties the other day

@perliedman it was just a side-note, that overall bike routing usability is a lot worse, if elevation is not taken into account. I've got elevation settled in my service.

This was fixes in #4046 with different penalties based on highway class and whether there is a bike lane present. Hopefully we can bundle this in a patch release for the 5.8 series.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

grib0 picture grib0  路  4Comments

AliKarami picture AliKarami  路  3Comments

Oyabi picture Oyabi  路  5Comments

RajibChanda picture RajibChanda  路  4Comments

ltsstar picture ltsstar  路  5Comments