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
Bike routing should avoid motorways, primary roads or roads with designated hgv access even if only parallel to them #598
Comments
First we need to fix the discovered maxspeed car specific code problems in #597, then we can have a look if further perference of low maxspeed limits is needed and usefull. |
Sure, thank you. |
#600 is only one of three changes. A second change is necessary to boost the influence of the internally assigned preference. A third and most complex change is needed for this:
I already thought about that when the map-matching came out. What do you think about the following crazy idea: We try to map-match every edge against another graphhopper instance for trucks (= another flag encoder). In case that a good match is found, we significantly decrease the preference for that edge. |
Preprocessing could increase the quality indeed but this does not belong to the core. We could create a new module which does certain kinds of time and resource consuming preprocessing. Also I don't think map matching is necessary here as we already have the internal edge IDs and can find out if it is a highway or converts soon into a highway. But still this would require preprocessing which we have to introduce at some point but probably as separate module. |
Performing of this task in a dedicated preprocessing step seems to be a good approach. Perfomance wise the good thing is that we probably don't need to run this for every edge. It should be sufficient for edges, which come from ways which are tagged with
This I don't understand. The solution must work also in case that the cycleway edge does not have a close direct connection to the other edge, which is good for trucks. I'm thinking about a cycleway which runs in parallel to a primary road (or a motorway) for a longer distance. I don't understand how you could know the edge ID of the close parallel primary without a process similar to map matching. |
This change doubles the influence of the priority influence for the bicycles encoders bike and mtb. The priority influence for the racebike is increased by factor 1.5. See graphhopper#597, graphhopper#598 and graphhopper#600.
That is indeed a good example I didn't thought about. But e.g. via traversing the graph and finding close edges like we do in LocationIndexTree it is still possible without map matching which is rather resource intense. |
That is indeed true and would reduce the preprocessing significantly. But as I don't think that these 'optimizations' are unique for the bike encoder we should create a framework first to do such things easier for all vehicles and then implement simple improvements there.
But then you would need to update this file and even smaller areas would read the world wide one? I do not think this is the best approach. I would like to keep the core really separated and instead introduce an algorithmic preprocessing which improves speed values, priorities and the like for other encoders too. |
This issue should be better closed and a new one created instead. The new one should continue the idea of calculating the route for a "truck"/"car" vehicle and down-prioritising those segments in case that the truck segments run close and "parallel" to the bicycle segment. |
I tried to find a real world example where this would improve the bike routing but I failed to find one. For now I'm closing here as suggested by @ratrun. |
Same issue as #597 , please see for my test case.
30 km/h zones and speed limits are increasingly used to create ways that, while still allowed for motor vehicles and mixed usage, are recommended for bicycles:
A 15 km/h limit is more extreme and can be taken as a strong indication of a road being practically forbidden to cars, almost equivalent to a cycleway. (An even lower limit on an extended way would practically be like a pedestrian area, I guess; I'm not sure if that's in use.)
To the contrary, roads which lead to motorway junctions may theoretically have a 50 km/h speed limit, but, when the limit becomes (or was) 90 km/h at a few meters distance, drivers are unlikely to respect the lower limit.
Concretely, I think that in addition to setAvoidSpeedLimit()
graphhopper/core/src/main/java/com/graphhopper/routing/util/BikeCommonFlagEncoder.java
Line 201 in fed0354
The text was updated successfully, but these errors were encountered: