[OSRM-talk] "nearest suitable road segment" Was: Helgoland in St. Peter-Ording
daniel at mapbox.com
Wed Aug 17 21:26:22 UTC 2016
Some of us have discussed what it might looks like to consider the "walking segment" as part of the shortest calculation - i.e. change the routing algorithm to:
- consider all possible start points within 100m of the start coordinate (maybe 1m increments along the road)
- consider all possible end points within 100m of the end coordinate
- find the fastest routes between all points
- calculate the "walking duration" from the start coordinate to the snapped start point
- calculate the "walking duration" from the end coordinate to the snapped end point
- select the shortest route after adding the walking durations to the road durations
There are a few situations when dropping markers near major highways where this approach could improve snapping behavior.
This makes routing quite a bit more expensive and complex, but might have some of the effect you're looking for - considering the distance from your coordinate to the actual routing graph. Nobody has written code to do this yet though, but it might be worth exploring a bit.
I'm not sure it would help with the Münsterstraße 15a example - in that case, what we really need are street address coordinates along Münsterstraße itself, rather than building centroids. This is pure geocoding, I don't know what OSRM could do to help. Perhaps you need to create a custom geocoder that snaps building centroids to nearby roads with the same name as they have in their `addr:*` tags?
> On Aug 17, 2016, at 2:00 PM, Florian Lohoff <f at zz.de> wrote:
> In my primary mapping area we decided to avoid "area style POIs"
> whenever possible for exactly this reason. Building a centroid on
> an area and routing to the nearest point on the routeable network
> is most of the time not the right answer. You dont want to end up
> in the middle of a multi-acre campsite - you want to be sent to the
> Florian Lohoff f at zz.de <mailto:f at zz.de>
> UTF-8 Test: The 🐈 ran after a 🐁, but the 🐁 ran away
> OSRM-talk mailing list
> OSRM-talk at openstreetmap.org <mailto:OSRM-talk at openstreetmap.org>
> https://lists.openstreetmap.org/listinfo/osrm-talk <https://lists.openstreetmap.org/listinfo/osrm-talk>
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the OSRM-talk