[GraphHopper] Weighting for bicycle routing

Peter graphhopper at gmx.de
Tue Aug 25 16:01:55 UTC 2015


Hi Armin,

that is possible and you would need to decrease the weight of a certain
edge if this edge is part of a bike route relation. For that you'll need
to tell the flag encoder to store this info e.g. in the flags and fetch
it in a custom Weighting. See eg. how to create a custom weighting
<https://github.com/graphhopper/graphhopper/blob/master/docs/core/weighting.md>
and e.g. encoder.setSpeed on how to store information in the flags.

Regards,
Peter

On 25.08.2015 15:46, XCTrails wrote:
> Hi,
>
> what is the default weighting approach for bicycle routing? A user has
> recently pointed out that in a certain case he gets routed via main
> roads while there are available bike trails. Case in point is from Bad
> Aibling to Bad Feilnbach - GH's bicycle routing is basically the
> faster/shorter connection, while http://cycle.travel/map for instance
> finds the "proper" bicycle connection (i.e. the one I'd actually prefer)
>
> What is the best way to influence this in GH? Implement a custom
> weighting? https://github.com/graphhopper/graphhopper/issues/190 seems
> to indicate that this should somehow be possible, but I'm not reading
> much out of that ticket which gives me further clues...
>
> (I do understand that there is a threshold issue, i.e. how far is one
> willing to detour in order to avoid highways for instance...)
>
> Thanks for any further hints or pointers...
>
> cheers,
> Armin
>
>
>
> _______________________________________________
> 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/20150825/447d5fc4/attachment.html>


More information about the GraphHopper mailing list