UrbanAnalyst / dodgr

Distances on Directed Graphs in R
https://urbananalyst.github.io/dodgr/
127 stars 16 forks source link

Update bicycle weighting profile? #200

Closed mpadge closed 1 year ago

mpadge commented 1 year ago

The [brouter algorithm] includes some really detailed profiles, and generates very good routing. One quick check for routing in Muenster along the promenade was perfect; image.

In comparison, graphhopper is okay: image

but initially goes along a road rather then promenade, whereas both OSRM and Valhalla are rubbish, and just route along car roads instead of the Promenade. Current dodgr algorithm for bikes still gives way too much weighting to car-laden roads. The cost factors are far more variable and sensitive to different types of ways than current dodgr equivalents. Plus another issue with this package is that the actual weighting profiles are all contained in a binary and not a text file, so are not directly accessible outside this package. That should also be changed.

mpadge commented 1 year ago

brouter actually only generates that impressive-looking route because it has a default to absoultely follow long-distance cycling routes where they exist. That alone makes it very european-centric, and such performance is not likely to be generally repeatible in other locations. Removing that bit of the code reverts to actually worse-looking routes than current dodgr, so profile will be left as, is for the moment at least.

mpadge commented 1 year ago

For reference, these were the modifications I made to weighting profiles to compare:

Current bicycle profile

mode highway type weighting speed
bicycle motorway 0.00 NA
bicycle trunk 0.30 NA
bicycle primary 0.70 15
bicycle secondary 0.80 15
bicycle tertiary 0.90 15
bicycle unclassified 0.90 15
bicycle residential 0.90 15
bicycle service 0.90 15
bicycle track 0.90 12
bicycle cycleway 1.00 15
bicycle path 0.90 12
bicycle steps 0.50 4
bicycle ferry 0.20 15
bicycle living_street 0.95 15
bicycle bridleway 0.70 8
bicycle footway 0.90 4
bicycle pedestrian 0.80 4
bicycle motorway_link 0.00 NA
bicycle trunk_link 0.30 NA
bicycle primary_link 0.70 15
bicycle secondary_link 0.80 15
bicycle tertiary_link 0.90 15

Equivalent brouter profile

These are roughly the equivalent values from Profiles from https://github.com/abrensch/brouter/blob/master/misc/profiles2/trekking.brf#L175:

mode highway type weighting speed
bicycle motorway 10000 NA
bicycle trunk 10.00 NA
bicycle primary 3.00 15
bicycle secondary 1.60 15
bicycle tertiary 1.40 15
bicycle unclassified 1.30 15
bicycle residential 1.10 15
bicycle service 1.30 15
bicycle track 1.30 12
bicycle cycleway 1.00 15
bicycle path 1.30 12
bicycle steps 40.00 4
bicycle ferry 10000 15
bicycle living_street 1.10 15
bicycle bridleway 5.00 8
bicycle footway 1.30 4
bicycle pedestrian 3.00 4
bicycle motorway_link 10000 NA
bicycle trunk_link 10.00 NA
bicycle primary_link 3.00 15
bicycle secondary_link 1.60 15
bicycle tertiary_link 1.40 15