Skip to main content

BRouter

🚧 This article is incomplete

This article is incomplete & needs to be reviewed. You can help by creating a pull request.

ANDROID ONLY

The third-party routing algorithm BRouter is only available for the Android version of the OsmAnd app.

Overview​

BRouter is a third-party routing algorithm that can be used in the OsmAnd app for offline navigation mode. It is designed to optimize a route based on different parameters, such as time, distance, or vehicle type.

BRouter uses OpenStreetMap data to create a route and then adjusts it based on specified parameters. It uses pre-calculated routes to quickly build a route offline. It also allows the user to customize routing profiles, which are defined by a set of parameters to account for various factors in route selection. The BRouter readme.txt file explains in more detail how to install and use the program.

OsmAnd provides the user with the ability to select routes with BRouter and configure routing profiles to better define the route according to the user's needs.

For more information you can visit official Brouter website.

BRouter integration in OsmAnd changed a lot during the summer of 2019. This guide assumes you are using the BRouter Android app in version 1.5.0 or higher as well as OsmAnd in version 3.4 or higher.

note

The third-party routing algorithm BRouter is only available for the Android version of the OsmAnd app.

BRouterBRouter

How to configure​

Follow this guide to installing and configuring the third-party BRouter Offline Navigation application for use in OsmAnd.

1. To get started, you need to install the BRouter app on your Android device from F-Droid or Google Play Store on your device.
2. Then, to navigate using the OsmAnd app along pre-calculated routes with the BRouter, you need to:

  • Open BRouter application and tap Download Manager.
BRouter
  • Zoom in and select the areas you want to route in. Then click "Start Download" and BRouter will start downloading the segments files for the selected areas.
BRouterBRouter
BRouterBRouter

Note that you will have to repeat this step periodically, whenever you want to have an updated version of the OSM data used for the routing.

3. Once this is done, start again the BRouter app and choose the "BRouter App" entry on the main menu. Choose a routing profile depending on your mode of travel. It could be biking, moped, hiking, or trekking. A list of available profiles for download in brf format can be found here. Or you can try using the routing profile in BRouter-online. Click "Service-Mode". Then, tick the boxes for the routing modes you want to use this profile for. You can use two different profiles per transportation mode, which will be mapped to the "shortest" and "fastest" presets (these are just labelling) in OsmAnd.

BRouterBRouter

4. If you have already loaded any segments previously, they will be displayed on the BRouter map. The segments have four states:

  • "Green" square - Selected new segment to download.
  • "Blue" square - The segment with updated data.
  • "Grey" square - The segment is already downloaded but requires updating.
  • "Yellow" square - The segment is being updated.
BRouter

5. When you have loaded the required map segments with BRouter and selected a routing profile in it, all the next settings of this type of navigation are made in the OsmAnd application.

6. You can create an "Application profile" in OsmAnd which will be using BRouter for offline routing. Use the BRouter (offline) routing type with any profile in the OsmAnd app. To do this, go to the main Menu β†’ Configure profile β†’ Navigation profile β†’ Navigation type β†’ Offline β†’ External β†’ BRouter (offline) and create a new profile based on the base profile of your choice (cycling here, for bicycle routing), with a custom name of your choice ("BRouter" on the screenshot below) and making use of "BRouter (offline)" for navigation.

BRouterBRouter

The BRouter app should be launched before OsmAnd for this specific entry to appear in OsmAnd. Therefore, if you cannot find "BRouter (offline)" navigation option, you should force quit OsmAnd and restart it.

OsmAnd version 4.7.1​

From version 4.7.1 upwards Osmand supports the profile parameter for mapping: Since Osmand version 3, many profiles can be defined in Osmand and the user can easily switch between these profiles. This allow now when using the service-interface to address different brouter-profiles in a more flexible and better comprehensive way.

  • If in Osmand a profile has "BRouter" defined as navigation service
  • AND the profile-name looks like "Brouter[mysting]"

==> then the profile "mystring" will be used in the Brouter-app! (this new mapping replaces in that case the basic mapping defined above and based on the file "serviceconfig.dat)

Examples: Osmand-profile name Brouter-app​

Brouter[trekking]   "trekking" profile will be used (file trekking.brf)
Brouter[racebike] "racebike" profile will be used (file racebike.brf)
....

Remark: Currently Osmand do not check the defined name (case sensitiv) for the Brouter-profile (mystring). If no profile is found, the routing will fail with "Could not calculate route.."!

BRouter

How to use​

This section describes a comparison of BRouter with the internal routing of the OsmAnd application.

When BRouter is configured, we can compare the pre-calculation speed of the BRouter routing data with the internal OsmAnd routing. Let's choose two random points in the Netherlands and start calculating the trip. For this, we set a balanced driving style without using altitude data for the base profile. The calculation time for this trip is 14.5 sec for our internal OsmAnd route. The route calculation time when using BRouter routing is less than 1 second.

BRouterBRouter

Route parameters​

Menu β†’ Navigation β†’ Settings β†’ Navigation settings β†’ Route parameters

BRouter

ParameterDescriptionNote
Fastest routeOptimized shorter route (energy saving) Enable to calculate fastest route or disable for fuel-saving route.In most cases, the shortest route will be suggested. Often this route can take longer than if the setting was disabled
Consider temporary limitationsRead about Consider temporary limitations option in this article.The routing algorithm can take into account the time constraints specified in the OpenStreetMap. Note that in some cases the information from the OSM may be out of date.

Other routing settings:

  • Offline calculation of OsmAnd route segment (Navigation β†’ Settings, image) - if this option is enabled, OsmAnd adds two segments to the calculated by Brouter track: one from My location to the starting point of a track and second from the end of the track to the finish point of your route. This option is active, when the distance to (or from) the track is more than 60 meters.
  • In the Recalculate route section of the Route parameters, you can enable and adjust route recalculation options.
  • In the Development section of the Route parameters, you can try new routing features, that are under testing now. Note, that these settings are only available when the OsmAnd development plugin is enabled.