Bus routing in BRouter

109 views
Skip to first unread message

Martijn Rotteveel

unread,
Jan 8, 2022, 2:41:29 PM1/8/22
to OSM Android bikerouting
How can I add bus lanes as allowed routes in, for example, the car profile?

abrensch

unread,
Jan 10, 2022, 1:12:51 PM1/10/22
to OSM Android bikerouting
first try would be to add "psv" access everyhre where there's already

   yes|permissive|designated|destination (details vary)

then add some logic to also include "bus=yes" and "psv=yes" tagging into the access logic

So that you end up in en expression like:

assign caraccess
= or bus=yes or psv=yes
  switch motorcar=

  <... see car-vario.brf ..>
motorcar=yes|permissive|designated|destination|psv


Only a good idea to reproduce existing urban bus-routes

Martijn Rotteveel

unread,
Jan 10, 2022, 3:56:03 PM1/10/22
to OSM Android bikerouting
Thanks for your answer.
I don't understand where exactly to add the addition. Is that in this section? I only get error codes.

assign caraccess
       switch motorcar=
              switch motor_vehicle=
                     switch vehicle=
                            switch access=
                                   not barrier=gate|bollard|lift_gate|cycle_barrier
                                   access=yes|permissive|designated|destination
                            vehicle=yes|permissive|designated|destination
                     motor_vehicle=yes|permissive|designated|destination
              motorcar=yes|permissive|designated|destination

Op maandag 10 januari 2022 om 19:12:51 UTC+1 schreef abrensch:

abrensch

unread,
Jan 11, 2022, 2:54:04 AM1/11/22
to OSM Android bikerouting
>> I only get error codes.

you found the copy of that expression in the "node context" of the script. There's a similar section in the "way context" further up.

In principal, it should be the same for the node-context, but the "psv" values are not in the node-context part of the lookup table
(because this is too exotic and there was no statistic for that):


brouter/lookups.dat at master · abrensch/brouter · GitHub

Martijn Rotteveel

unread,
Jan 22, 2022, 5:24:53 AM1/22/22
to OSM Android bikerouting
I think I'm still doing something wrong because I still can't :(.
Is it possible to share a completely modified file?

Op dinsdag 11 januari 2022 om 08:54:04 UTC+1 schreef abrensch:
Reply all
Reply to author
Forward
0 new messages