Brouter in combination with OsmAnd

762 views
Skip to first unread message

Harry van der Wolf

unread,
Apr 18, 2014, 8:06:55 AM4/18/14
to osmand
Hi,

@Arndt: Please correct me where I'm wrong and please give additional info where I fall short (or don't know myself).

Based on the discussion in thread https://groups.google.com/forum/#!topic/osmand/bvOilzII_II ,  I tried Brouter again. I "tested" it some 6-7 months ago as well. Currently we are on version 0.98. So again some experience with the app, simply because you can easily interface it with OsmAnd. Website: http://brensche.de/brouter/.
The android Brouter app can read your Osmand favorites and use these as start/end points and use them as waypoints.
It calculates a route and adds this a a brouter0.gpx track to your tracks folder with subsequent numbers in the same session. Note though that it overwrites the tracks again in the next use of the program: Be aware of that!
Osmand can use these gps files as a route as well: load the gpx track as a map layer, select directions and OsmAnd asks you to use the track as route. Or alternatively from the map: select same start and end point and Osmand asks whether it should use the route/track.

Brouter uses navigation profiles (of course) which are actually simple text files and can be modified. They reside in /brouter/profiles2. This also means you can create your own profiles (if you know what to do :) ).
Brouter also uses its own "maps" where you can download full and car maps (cross), full maps (bottom-right to top-left) or car maps (bottom-right to top-left). This could use some explanation on the website and in the app. It took me some time to recognize it.I first thought it had something to do with slicing the map (only the top-left or bottom-right, or top-right or bottom-left, and which slice does it take?) of the map.

I tested the "fastbike" option and the "car-test" option and always compared them with the OsmAnd routing. I didn't test moped nor trekking.
I also added some images where the purple line is the OsmAnd route and the turquoise line is the Brouter gpx route/track.

"fast-bike":
(to start with: I don't know why it's called fast-bike as there is no "slow-bike" or "touristic-bike" or whatever, maybe as pendant to short-bike but that's not in the list.)
I tested it with routes up to 50-60 kilometers as that's about the maximum I do (I don't drive a racing bicycle. I want to enjoy nature, take pictures and a cup of coffee with apple pie every now and then: that limits time and distance).

I think it does a slightly better job then OsmAnd, but that's because Brouter uses cycleways more then "car" roads compared to OsmAnd. I prefer a nice cycleway above a road even if it is slightly longer (I don't know if its slightly longer/shorter as the distance differences mostly fall within a few 100 meters, br:osm: 20,8 vs 20,9 km (image zwolle-raalte-cycle-360x600.jpg), 23,3 vs 24,2 km, 43,3 vs 44,0 km, 83,9 vs. 79,2 km). It seems that the longer the distance the longer the route brouter uses, but it uses cycleways far better then OsmAnd which I prefer. It really calculates a cycle route instead of a route over roads where you can cycle as well (but that's my opinion).
So again: It's better in my world as I like to use cycleways over normal roads, e.g.: it's personal taste. I can't say anything about the "mathematical and algorithm wise" optimal route.
Occasionally you find some specific A*/Dijkstra examples (attached image zwolle-raalte-square-360x600.jpg) of algorithm culpits.
The "zwolle-raalte-cycle-360x600.jpg" shows the difference in routing which theoretically is only 100 meters in difference. The turqoise route is over cycleways, the OsmAnd first part of the route is over the normal road have a cycle-lane. Both take the same "touristical, scenic cycle route" for the second half.
I calculated quite some routes where Brouter always took the "nicer" route (again: my personal taste). I didn't make screenshots of all routes of course.


"car-test":
When doing a couple of calculations it turns out that brouter can calculate a long (600+ km) route where OsmAnd can't. It takes long to very long on longer distances, but it does calculate the route. It also calculates the same route as Osmand does with a few quirks occasionally.
When I calculated a route from Zwolle, NL to Sittard, NL, brouter routed me through 2 cities (image: zwolle-sittard-360x600.jpg) which is definitely shorter in km's but also definitely (much) longer in time. Same on a route from Zwolle to Riezlern (Au) where I had to use 2 waypoints for OsmAnd and did the same for Brouter. Brouter again routed me through a city being Kempten (image zwolle-riezlern-360x600), and then came back on the exact same route. Again: Osmand purple, Brouter turqoise.
(Brouter could calculate this route also without waypoints, but it took more then 10-12 minutes probably while it leads through Nordrhein-Westfalen which has an extremely dense road network).

But it is called car-test and obviously needs some (minor) corrections either in the algorithm or in the "car-test" navigation profile.

All in all I like the direction brouter is going especially as it can calculate long routes where OsmAnd can't. It's now a question when OsmAnd can calculate longer routes again.
And yes: Without being able to program it myself, I would very much like both brouter and OsmAnd to calculate much faster. When pre-calculating a route from home it is only a nuissance. When in the car it's really horrible, but that's only for Osmand as Brouter is not intended for that kind of use. At least not while driving (keep your hands on the wheel).

Harry

zwolle-raalte-cycle-square-360x600.jpg
zwolle-riezlern-360x600.jpg
zwolle-sittard-360x600.jpg
zwolle-raalte-cycle-360x600.jpg

Peter B

unread,
Apr 19, 2014, 7:12:54 AM4/19/14
to osm...@googlegroups.com
I use Brouter within osmand, in settings / navigation / bicycle navigation service BROUTER selected.
How can I select the profile (fastbike or trekking) which is used now ?
Peter

Arndt

unread,
Apr 19, 2014, 8:16:20 AM4/19/14
to osm...@googlegroups.com


Am Freitag, 18. April 2014 14:06:55 UTC+2 schrieb Harry van der Wolf:
@Arndt: Please correct me where I'm wrong and please give additional info where I fall short (or don't know myself).

Hi Harry,

thanks for testing, I'm short of time now and will answer the details later. Seems you did not test the service interface (choosing brouter as navigation service in OsmAnd?) The "slow-bike" is called trekking.

regards, Arndt

Arndt

unread,
Apr 19, 2014, 8:19:02 AM4/19/14
to osm...@googlegroups.com


Am Samstag, 19. April 2014 13:12:54 UTC+2 schrieb Peter B:
I use Brouter within osmand, in settings / navigation / bicycle navigation service BROUTER selected.
How can I select the profile (fastbike or trekking) which is used now ?
Peter

Hi Peter,

if you start the BRouter app and after profile selection plus eventually a route calculation, you can press the "Server Mode" Button. Then you can select which of the 6 "routing modes" to configure with the configuration that you selected before. Finally you get a feedback screen telling the current configuration of all 6 modes.

Harry van der Wolf

unread,
Apr 19, 2014, 12:45:00 PM4/19/14
to osmand
2014-04-19 14:16 GMT+02:00 Arndt <abre...@googlemail.com>:


thanks for testing, I'm short of time now and will answer the details later. Seems you did not test the service interface (choosing brouter as navigation service in OsmAnd?) The "slow-bike" is called trekking.


No, I did not test it from OsmAnd. But I just did and it works very nice. I did of course recalculate a couple of the previous cycle routes and they are the same. They should be of course, but it's nice to be able to confirm it.
This makes Brouter even better for cycle routes directly from OsmAnd.


2014-04-19 14:19 GMT+02:00 Arndt <abre...@googlemail.com>:

if you start the BRouter app and after profile selection plus eventually a route calculation, you can press the "Server Mode" Button. Then you can select which of the 6 "routing modes" to configure with the configuration that you selected before. Finally you get a feedback screen telling the current configuration of all 6 modes.


I didn't know that either. Just tried that. Works both with cycle and car with one limitiation.
If you create a little longer route you get a time out: "pass1 time out after 60 seconds". It happens with routes of 160+ kilometers straight line (before calculation) on my phone. I assume it depends on CPU power when you pass the 1 minute and get the time out error.
This is a pity as this is where Brouter would come in handy. But in this conditions OsmAnd can calculate a longer route.

Harry

Arndt

unread,
Apr 19, 2014, 1:50:07 PM4/19/14
to osm...@googlegroups.com
Am Samstag, 19. April 2014 18:45:00 UTC+2 schrieb Harry van der Wolf:
 
If you create a little longer route you get a time out: "pass1 time out after 60 seconds". It happens with routes of 160+ kilometers straight line (before calculation) on my phone. I assume it depends on CPU power when you pass the 1 minute and get the time out error.
This is a pity as this is where Brouter would come in handy.

Hi Harry,

the concept here is somewhat different, it is the topic I comment yesterday ("timeout-free recalculations"):

  https://groups.google.com/d/msg/osmand/bvOilzII_II/wNvSxjNbi-YJ

the trick is that if you calculate a route outside OsmAnd and bind it to a routing mode (using the "Server Mode" Button, then you will not get a timeout if you calculate a route to the exact same destination from within OsmAnd afterwards. "Exact same" destinations means +- 5m, so it should be the same destination elecronically (e.g. a waypoint). Also all subsequent calculations to this destination will not get a timeout.So you can follow a long distance route using OsmAnd, including dynamic recalculations, by calculating it initially outside OsmAnd

However,  please note that BRouter is not (yet) a car router. Your observation that it tends to cross a city instead of taking the highway is true, but this can be easily adjusted by tuning the cost factors in the profile definition (car-test.brf). But what's really missing to make it a car router is turn-restrictions, travel-time calculations and network-generated voice hints.

Harry van der Wolf

unread,
Apr 19, 2014, 4:51:50 PM4/19/14
to osmand
2014-04-19 19:50 GMT+02:00 Arndt <abre...@googlemail.com>:
Am Samstag, 19. April 2014 18:45:00 UTC+2 schrieb Harry van der Wolf:
 
If you create a little longer route you get a time out: "pass1 time out after 60 seconds". It happens with routes of 160+ kilometers straight line (before calculation) on my phone. I assume it depends on CPU power when you pass the 1 minute and get the time out error.
This is a pity as this is where Brouter would come in handy.

Hi Harry,

the concept here is somewhat different, it is the topic I comment yesterday ("timeout-free recalculations"):

  https://groups.google.com/d/msg/osmand/bvOilzII_II/wNvSxjNbi-YJ

the trick is that if you calculate a route outside OsmAnd and bind it to a routing mode (using the "Server Mode" Button, then you will not get a timeout if you calculate a route to the exact same destination from within OsmAnd afterwards. "Exact same" destinations means +- 5m, so it should be the same destination elecronically (e.g. a waypoint). Also all subsequent calculations to this destination will not get a timeout.So you can follow a long distance route using OsmAnd, including dynamic recalculations, by calculating it initially outside OsmAnd

I learn every day. That does work indeed. Has that been documented somewhere?
What you mention about the recalculation ainside OsmAnd (using te server mode) after an initial calculation outside OsmAnd is something I can't test from the sofa.
I will test somewhere in the coming days.
 

However,  please note that BRouter is not (yet) a car router. Your observation that it tends to cross a city instead of taking the highway is true, but this can be easily adjusted by tuning the cost factors in the profile definition (car-test.brf). But what's really missing to make it a car router is turn-restrictions, travel-time calculations and network-generated voice hints.


I understand. That's why I mentioned: "But it is called car-test and obviously needs some (minor) corrections either in the algorithm or in the "car-test" navigation profile."

Maybe I couldn't find it but Brouter definitely needs some documentation to get users going.

Harry
Reply all
Reply to author
Forward
0 new messages