[OSRM-talk] Pedestrian Routing giving longer results due to gap calculation
nikhil.js at gmail.com
Tue Sep 17 13:06:27 UTC 2019
I am implementing osrm-backend for pedestrian (foot) routing. I have
successfully built with foot.lua profile (modified to include trunk roads
..and am having a working osrm-frontend instance up to get results for
I'm running into a problem regarding buildings / premises.
In osrm-frontend, if the destination point is not on a known path, then
there is a translucent gap line drawn between the end of the blue route
line and the marked destination location.
I'd like to know if there is a technical term for this gap, and where in
the osrm code / config can we tinker with it.
Destination location is inside a building / premises.
*Result 1:* Road distance = 300m, gap = about 20m
If I move the destination marker by just a few meters in, then osrm is
drawing a completely different route going all the way around. Now the
result given is:
*Result 2:* Road distance = 1000m, gap = about 10m
Please see this screenshot with both the results shown:
So here we have a problem.
I have weighted my .lua profile by distance.
(changed `weight_name='duration'` to `weight_name='distance'` in foot.lua)
Giving result with minimum on-road walking distance is top priority for my
use case - entering in at the right point in the premises is not.
I would rather have the pedestrian walk a few extra meters inside the
premises, than having them walk an extra 700m of road (more than double the
It would have also been fine if the alternative paths (light blue on
frontend) had the shorter route with a longer gap, but even that goes away
here and the alternatives given are only worse.
I can't find any documentation for what to call this gap or how to affect
it via the .lua profile etc.
I'm guessing that the router is prioritizing this gap over all else ; hence
it is not considering the fact that the route distance is changing by a
So what I want to do with my osrm-backend build:
- Make the router ignore the gap and simply prioritize by route distance
over all else.
- Add the gap length to the route length when doing prioritization.
I can understand that doing this would make the router not work for other
applications, hence I only want to customize my own instance to fit my use
Looking for some help on this matter. I can share the url's of my osrm
instances privately if someone needs for testing.
If it's not part of the standard options (I'm guessing not), even then if
someone can point me to where the relevant code is, or what is the
variable/function name of this gap, then I can take a crack at it myself.
Thanks, and kudos to the programmers that made this amazing tool possible.
The speed and performance is fantastic I'll add.
Nikhil VJ, Pune, India
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the OSRM-talk