New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Bicycle routing improvments #312
Conversation
primary_link had a higher priority than primary for bicycle routing, we surely want to avoid primary_link's when on a bike, so it should be the same value at least. Also primary had the same priority than trunk (which is very much motorway-like, alas horrible for bicycles), adapt priorities a tad so we prefer primaries over trunks. IMHO, we should rather decrease the priorities of trunks and motorways further to make them less attractive. Ever biked on a motorway? Signed-off-by: Sebastian Spaeth <Sebastian@SSpaeth.de>
Residential streets are usually a little quieter, so they should be a little preferred over primary/secondary/tertiary streets. Living_streets are quite similar to residential streets for bikes, they should have the same priority and only be marginally slower. Signed-off-by: Sebastian Spaeth <Sebastian@SSpaeth.de>
You do not want to bike there! Really! (also trunks are really not nice) Signed-off-by: Sebastian Spaeth <Sebastian@SSpaeth.de>
Decrease the priority of unpaved/grass roads or tracks with bad conditions (tracktype4/5). Also, we need to slow down to pass cycle_barriers. Signed-off-by: Sebastian Spaeth <Sebastian@SSpaeth.de>
|
Implementation wise it looks fine. I'm wondering if you test these params. I guess you know it is possible to test on PC for bicycle and it is very fast way to test (OsmAndMapCreator and you need to download map on PC). avoid tag="surface" value="grass" modifySpeed="-5" Actually setting values smallest values to "motorway" probably not very good because it will consider driving longer distance by bicycle road than motorway, in our case 1.5/0.4=4. So the route could be 4 times logner. That's why I'm asking you do you have any route that is improved by that significant change? |
|
Yes, I did test this by using a local routing.xml and loaded it with osmandMapCreator, and trying some routes. Seemed to have worked well. I have not tried an area with actual motorways, granted. But a 4 times longer cycleway is still preferable to a ride on the motorway. Perhaps we should simply AVOID motorways completely in bike mode? (I now there is the "avoid motorways" setting that can be used for that). I'll play with some more routes close to motorways. I like the idea of maxSpeed=5 |
|
I have now tested my changes more thoroughly. In general they work well. I think punishing motorways that hard is a good thing. So I would still support merging the above patches. We can always tweak things to be better. One oddity I found is that footways (8km/h prio 0.9 are much slower and less preferred than tracks 12km/h and prio 1.5). In many areas highway=footway,bicycle=yes is used synonymously with highway=track,bicycle=yes. Osmand was taking really long bike detours to avoid crossings with footway,bicycle=yes. Would it make sense to treat these two a little more equal? In any case that is beyond this patchset and should be addressed separately. |
|
My point about trunk roads that current punishment more then enough. I'm talking about boundary cases like bicycle road or permissions were not mapped at all. However this strange case and we can raise it as a map issue. Generally speaking I would even treat motorway/trunk as forbidden for bicycle but there are so many weird cases especially in Asia... So my main question was did you improve any real route with changing 0.7 -> 0.4? If not then it is more like an artificial change however it makes sense. What I learned from car.routing.xml that every change should have an example but I agree bicycle routing was never tested well. Coming back to priorities and footway, I think it will be better to increase speed on footway to 12 km/h and leave priority to 1. So reprasing into cycleway roads we allow to make 1.5*(18/12)=2.25 times detours which is still to much and next reasonable question will be why do we have 1.5 multiplicator for cycleway/track will it be 1.3 enough. I merge this pull request but it would be awesome if you can finalize tweaking bicycle parameters. |
This is a series of small contained patches that improve routing.xml for bicycles. I have left out the "decreasedPriority= -0.2" part for now, until it is clear if/how we can increase the priority of a road depending on the condition. So this should all be easy things.
License is GPLv3+ or whatever you prefer.
(Would it also be possible to implement a speed modifier? like [avoid tag="surface" value="grass" modifySpeed="-5" /] or so?)