<div dir="ltr"><span style="color:rgb(34,34,34);font-family:arial,sans-serif;font-size:12.8px;font-style:normal;font-variant-ligatures:normal;font-variant-caps:normal;letter-spacing:normal;text-align:start;text-indent:0px;text-transform:none;white-space:normal;word-spacing:0px;background-color:rgb(255,255,255);text-decoration-style:initial;text-decoration-color:initial">Hi François,</span><div><span style="font-size:12.8px"><br></span></div><div><span style="font-size:12.8px"> Currently, no - snapping for coordinates is strictly whichever is nearest (with one exception: <a href="https://blog.mapbox.com/robust-navigation-with-smart-nearest-neighbor-search-dbc1f6218be8">https://blog.mapbox.com/robust-navigation-with-smart-nearest-neighbor-search-dbc1f6218be8</a>).</span></div><div><span style="font-size:12.8px"><br></span></div><div><span style="font-size:12.8px"> I can think of two things:</span></div><div><span style="font-size:12.8px"><br></span></div><div><span style="font-size:12.8px"> 1. Try using the `/match` API. This API snaps to *many* nearest points (usually within 15m), and tries routes between all combinations, and returns the most likely. As long as your coordinates are reasonably close (<2km), it should be almost usable as a replacement for the `/route` API.</span></div><div><span style="font-size:12.8px"><br></span></div><div><span style="font-size:12.8px"> 2. You can use the `/nearest` API to return more than one possible snap point within range, then pick one, then request `/route` with the snapped coordinates you have chosen. This is only viable if `/nearest` returns enough information for you to decide which snapping point is best.</span></div><div><span style="font-size:12.8px"><br></span></div><div><span style="font-size:12.8px">daniel</span></div><div><span style="font-size:12.8px"><br></span><div class="gmail_extra"><br><div class="gmail_quote">On Fri, May 4, 2018 at 8:37 AM, François Lacombe <span dir="ltr"><<a href="mailto:fl.infosreseaux@gmail.com" target="_blank">fl.infosreseaux@gmail.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div dir="ltr"><div><div>Hi all,<br><br></div>I'm wondering if osrm can weight its snapping choices for start location ?<br></div><div>Especially for footwalk mode.<br><br></div><div>There are situations where farer ways can lead to shorter routes.<br></div><div>Currently osrm always snap start location to nearest way but doesn't give me the shortest route according to my knowledge.<br><br></div><div>Is there any trick in the profile to make some ways preferable to snap to?<br></div><div>Should I open an issue regarding this?<br><br></div><div>All the best<br></div><div><div><br clear="all"><div><div><div class="gmail-m_1117692909392992476gmail_signature"><div dir="ltr"><b>François Lacombe</b><br><br>fl dot infosreseaux At gmail dot com<br><a href="http://www.infos-reseaux.com" target="_blank">www.infos-reseaux.com</a><br><a href="http://www.twitter.com/InfosReseaux" target="_blank">@InfosReseaux</a></div></div></div>
</div></div></div></div>
<br>______________________________<wbr>_________________<br>
OSRM-talk mailing list<br>
<a href="mailto:OSRM-talk@openstreetmap.org">OSRM-talk@openstreetmap.org</a><br>
<a href="https://lists.openstreetmap.org/listinfo/osrm-talk" rel="noreferrer" target="_blank">https://lists.openstreetmap.<wbr>org/listinfo/osrm-talk</a><br>
<br></blockquote></div><br></div></div></div>