<div dir="ltr"><p style="margin:0px;white-space:pre-wrap">Hello,</p>
<p style="margin:0px;white-space:pre-wrap"><br></p><p style="margin:0px;white-space:pre-wrap">I am implementing osrm-backend for pedestrian (foot) routing. I have successfully built with foot.lua profile (modified to <a href="https://gis.stackexchange.com/questions/334189/osrm-foot-walking-profile-avoiding-trunk-roads/334190#334190">include trunk roads</a>) </p><p style="margin:0px;white-space:pre-wrap">..and am having a working osrm-frontend instance up to get results for various inputs.</p>
<p style="margin:0px;white-space:pre-wrap"><br></p>
<p style="margin:0px;white-space:pre-wrap">I'm running into a problem regarding buildings / premises.</p>
<p style="margin:0px;white-space:pre-wrap">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.</p>
<p style="margin:0px;white-space:pre-wrap">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.</p>
<p style="margin:0px;white-space:pre-wrap"><br></p>
<p style="margin:0px;white-space:pre-wrap"><b>Example scenario:</b></p>
<p style="margin:0px;white-space:pre-wrap">Destination location is inside a building / premises.</p>
<p style="margin:0px;white-space:pre-wrap"><b>Result 1:</b> Road distance = 300m, gap =  about 20m</p>
<p style="margin:0px;white-space:pre-wrap"><br></p>
<p style="margin:0px;white-space:pre-wrap">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:</p>
<p style="margin:0px;white-space:pre-wrap"><b>Result 2:</b> Road distance = 1000m, gap = about 10m</p>
<p style="margin:0px;white-space:pre-wrap"><br></p>
<p style="margin:0px;white-space:pre-wrap">Please see this screenshot with both the results shown: <a href="http://nikhilvj.co.in/files/osm/osrm-pedestrian-gap-1.png">http://nikhilvj.co.in/files/osm/osrm-pedestrian-gap-1.png</a></p>
<p style="margin:0px;white-space:pre-wrap"><br></p><div><div><div><div><img src="http://nikhilvj.co.in/files/osm/osrm-pedestrian-gap-a.png" style="margin-right: 0px;"><br></div></div></div></div>
<p style="margin:0px;white-space:pre-wrap"><br></p>
<p style="margin:0px;white-space:pre-wrap">So here we have a problem.</p><p style="margin:0px;white-space:pre-wrap">I have weighted my .lua profile by distance.</p><p style="margin:0px;white-space:pre-wrap">(changed `weight_name='duration'` to `weight_name='distance'` in foot.lua)</p><p style="margin:0px;white-space:pre-wrap">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.</p>
<p style="margin:0px;white-space:pre-wrap">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 actual).</p>
<p style="margin:0px;white-space:pre-wrap"><br></p><p style="margin:0px;white-space:pre-wrap">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.</p><p style="margin:0px;white-space:pre-wrap"><br></p>

<p style="margin:0px;white-space:pre-wrap">I can't find any documentation for what to call this gap or how to affect it via the .lua profile etc.</p>
<p style="margin:0px;white-space:pre-wrap"><br></p>
<p style="margin:0px;white-space:pre-wrap">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 whopping amount.</p>
<p style="margin:0px;white-space:pre-wrap"><br></p>
<p style="margin:0px;white-space:pre-wrap">So what I want to do with my osrm-backend build:</p>
<p style="margin:0px;white-space:pre-wrap">- Make the router ignore the gap and simply prioritize by route distance over all else.</p><p style="margin:0px;white-space:pre-wrap">OR:</p><p style="margin:0px;white-space:pre-wrap">- Add the gap length to the route length when doing prioritization.</p><p style="margin:0px;white-space:pre-wrap"><br></p><p style="margin:0px;white-space:pre-wrap">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 case scenario.</p><p style="margin:0px;white-space:pre-wrap"><br></p>
<p style="margin:0px;white-space:pre-wrap">Looking for some help on this matter. I can share the url's of my osrm instances privately if someone needs for testing.</p>
<p style="margin:0px;white-space:pre-wrap"><br></p><p style="margin:0px;white-space:pre-wrap">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.</p><p style="margin:0px;white-space:pre-wrap"><br></p><p style="margin:0px;white-space:pre-wrap">Thanks, and kudos to the programmers that made this amazing tool possible. The speed and performance is fantastic I'll add.</p><div><div dir="ltr" class="gmail_signature" data-smartmail="gmail_signature"><div dir="ltr"><div><div dir="ltr"><div><div dir="ltr"><div><div dir="ltr"><div dir="ltr"><div dir="ltr"><div dir="ltr"><div dir="ltr"><div><br></div><div>--<br>Cheers,<br>Nikhil VJ, Pune, India<br><a href="https://nikhilvj.co.in" target="_blank">https://nikhilvj.co.in</a></div></div></div></div></div></div></div></div></div></div></div></div></div></div></div>