[GraphHopper] Bearing at routing

Peter graphhopper at gmx.de
Mon Nov 3 20:31:30 UTC 2014


No, can't find the workaround but it was related to a special weighting
class I think with an edge check (read further ;)).

You'll have to do some modifications to the QueryGraph where one
normally inserts a virtual node for the query point (the
snapped-to-road-point) and you add some virtual edges. Now using the
bearing you can avoid inserting some of the edges OR increase the weight
for them OR create a special weighting class which increases the
weighting if you encounter those virtual edges.

E.g. in TurnWeighting we check for a U-turn like this:
if (turnCosts == 0 && edgeId == prevOrNextEdgeId)
            return weight + defaultUTurnCost;

you'll have to detect now this special U-turn and do a similar thing I think

Regards,
Peter.

On 03.11.2014 21:17, Emux wrote:
> In the ticket you wrote about a quick workaround that exists in the
> mailing list.
> Have you found it? I search but I cannot find it.
>
> I suspect also that this feature is not solved just by using graphs
> with turn restrictions.
>
> -- 
> Emux
> Cruiser <http://wiki.openstreetmap.org/wiki/Cruiser> - Atlas
> <http://wiki.openstreetmap.org/wiki/Atlas_%28navigation_application%29>
>
>
> _______________________________________________
> GraphHopper mailing list
> GraphHopper at openstreetmap.org
> https://lists.openstreetmap.org/listinfo/graphhopper

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.openstreetmap.org/pipermail/graphhopper/attachments/20141103/f6ec3da9/attachment.html>


More information about the GraphHopper mailing list