[OSRM-talk] adding way id and direction to output
Emil Tin
emil at tin.dk
Thu Apr 25 14:47:43 UTC 2013
I think what you're requesting will be covered by the mode flag, which is mostly done:
https://github.com/DennisOSRM/Project-OSRM/tree/experimental/modes
The idea is that the LUA profile can set the mode for each direction of a way:
https://github.com/DennisOSRM/Project-OSRM/blob/experimental/modes/profiles/testbot.lua#L83
and it wil be passed as part of the returned route.
https://github.com/DennisOSRM/Project-OSRM/blob/experimental/modes/features/testbot/mode.feature#L56
For bikes, 1 could be normal and 2 pushing a bike. For your use, you could always just use 1 for forward and 2 for backward, regardless of way type.
Emil
On Apr 25, 2013, at 13:32 , Jens Thiele <karme at karme.de> wrote:
> Hi,
>
> i want to add way id and direction (forward/backward) to the routing
> output
>
> to add the way id a simple hack is to use the id as name in the lua
> profile
>
> adding the direction (forward/backward) on each way seems extremely hard
>
> i tried to keep track of all swaps of source/target but miserably failed
> so far
>
> i also find it very confusing where directed edges are used and where
> not
>
> the best clues i got so far are from emil's fine document
> "processing-flow" in the wiki [0] but there is reads, too:
> "(It's unknown why forward and backwards settings are needed here. They're
> always set to the same values.)"
>
> any help / suggestions?
>
> greetings
> Jens
>
> PS: i wonder wether the code couldn't be simplified a lot by using
> directed edges only after the extraction step
>
> [0] https://github.com/DennisOSRM/Project-OSRM/wiki/Processing-Flow
>
> _______________________________________________
> OSRM-talk mailing list
> OSRM-talk at openstreetmap.org
> http://lists.openstreetmap.org/listinfo/osrm-talk
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.openstreetmap.org/pipermail/osrm-talk/attachments/20130425/d6b2e7d4/attachment.html>
More information about the OSRM-talk
mailing list