[OSRM-talk] Snapping preferences
Daniel Patterson
daniel at mapbox.com
Fri May 4 16:36:04 UTC 2018
Hi François,
Currently, no - snapping for coordinates is strictly whichever is nearest
(with one exception:
https://blog.mapbox.com/robust-navigation-with-smart-nearest-neighbor-search-dbc1f6218be8
).
I can think of two things:
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.
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.
daniel
On Fri, May 4, 2018 at 8:37 AM, François Lacombe <fl.infosreseaux at gmail.com>
wrote:
> Hi all,
>
> I'm wondering if osrm can weight its snapping choices for start location ?
> Especially for footwalk mode.
>
> There are situations where farer ways can lead to shorter routes.
> Currently osrm always snap start location to nearest way but doesn't give
> me the shortest route according to my knowledge.
>
> Is there any trick in the profile to make some ways preferable to snap to?
> Should I open an issue regarding this?
>
> All the best
>
> *François Lacombe*
>
> fl dot infosreseaux At gmail dot com
> www.infos-reseaux.com
> @InfosReseaux <http://www.twitter.com/InfosReseaux>
>
> _______________________________________________
> OSRM-talk mailing list
> OSRM-talk at openstreetmap.org
> https://lists.openstreetmap.org/listinfo/osrm-talk
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.openstreetmap.org/pipermail/osrm-talk/attachments/20180504/5096b039/attachment.html>
More information about the OSRM-talk
mailing list