Skip to content

Valhalla offline

Mark Tehver edited this page Feb 5, 2021 · 4 revisions

Valhalla routing packages

Note: Starting from SDK 4.3, CARTO Mobile SDK supports Valhalla 3 packages. Valhalla support was removed from SDK 4.2, while SDK 4.1 supported Valhalla 2 packages.

Valhalla routing packages are stored as MBTiles-like SQLite files with special .vtiles extension. Individual tiles are stored in tiles table using zoom levels 0, 1 and 2 as used by Valhalla routing engine.

The following sections describe how to create the packages from OSM data.

Install Valhalla tile generator

  • Clone Valhalla Mjolnir project. Note that SDK uses a specific version of Valhalla routing engine, so the checked out version should have the same major version number.
  • Check and modify scripts/dependencies.sh, some apt-get packages may need to be changed depending on Linux distro
  • Clone OSM-Binary project inside mjolnir directory
  • Clone Valhalla conf project
  • After that run scripts/install.sh
  • Modify the configuration in conf/valhalla.json, check tile_dir and other paths.
  • Binaries for building tiles are under .libs folder: execute .libs/valhalla_build_tiles -c conf/valhalla.json PATH_TO_OSM_FILE

Making offline tile packages

See the instructions in mobile-sdk-scripts repository.