Skip to content
This repository was archived by the owner on Feb 16, 2024. It is now read-only.
/ lotyr Public archive

A wrapper around Valhalla to help you easily generate route instructions fully offline.

Notifications You must be signed in to change notification settings

tourforge/lotyr

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

40 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Lotyr

GitHub Workflow Status

This repository is archived because OpenTourBuilder no longer uses it to generate route instructions.

A thin wrapper around Valhalla that statically links all dependencies and provides a simple C API for querying the Valhalla API within a single process. You can use exactly the same JSON routing API as you would if you were connecting to a Valhalla server over a network.

Current limitations:

  • Only Windows, MacOS, and Linux builds are supported right now. Android builds should be pretty easy to implement, and iOS should also be possible.
  • Only the routing API endpoint is usable from the library. Support for more of the endpoints can be very easily added.

Building

Linux

  1. Install a C/C++ compiler, Git, and CMake.

    Example - Ubuntu:

    sudo apt update
    sudo apt upgrade
    sudo apt install build-essential git cmake

    Example - Fedora:

    sudo dnf groupinstall "Development Tools" "Development Libraries"
    sudo dnf install gcc-c++ cmake

    Example - Arch Linux:

    sudo pacman -Syu base-devel git cmake
  2. Download Boost and extract it somewhere (example: $HOME/Downloads/boost_1_80_0)

  3. Clone and change directory to the repository by running the following commands in a terminal:

    git clone https://github.com/evresi/lotyr
    cd lotyr
    git submodule update --init --recursive
  4. Build Lotyr by running the following commands in the same terminal:

    cmake -B build -DCMAKE_BUILD_TYPE=Release -DBOOST_ROOT=$HOME/Downloads/boost_1_80_0
    make -C build

    Don't forget to replace $HOME/Downloads/boost_1_80_0 with where you extracted Boost if you extracted it elsewhere.

    Tip: to speed up compilation, you can add -jX to the end of the make command, where X is the number of physical CPU cores you have. If you're not sure how many you have, you can add -j$(nproc) instead, which should still be faster.

MacOS

  1. Install Xcode 14.
  2. Launch Xcode and proceed through the setup (if any). You may close it afterwards. This is to complete any first-run setup, which is sometimes required before being able to install Git.
  3. Install Git by running the following the following command in Terminal and proceeding through the prompt to install Git (if any):
    git --version
  4. Install Brew.
  5. Install CMake by running the following command in Terminal:
    brew install cmake
  6. Download Boost and extract it somewhere (example: $HOME/Downloads/boost_1_80_0)
  7. Clone and change directory to the repository by running the following commands in Terminal:
    git clone https://github.com/evresi/lotyr
    cd lotyr
    git submodule update --init --recursive
  8. Build Lotyr by running the following commands in the same Terminal:
    cmake -B build -DCMAKE_BUILD_TYPE=Release -DBOOST_ROOT=$HOME/Downloads/boost_1_80_0
    make -C build -j$(sysctl -n hw.physicalcpu)
    Don't forget to replace $HOME/Downloads/boost_1_80_0 with where you extracted Boost if you extracted it elsewhere.

Windows

  1. Install Visual Studio, Git, and CMake.
  2. Download Boost for Windows and extract it somewhere (example: C:/boost_1_80_0)
  3. Clone and change directory to the repository by opening Command Prompt and running the following commands:
    git clone https://github.com/evresi/lotyr
    cd lotyr
    git submodule update --init --recursive
    
  4. Build Lotyr by running the following commands in the same Command Prompt:
    cmake -B build -DCMAKE_BUILD_TYPE=Release -DBOOST_ROOT=C:/boost_1_80_0
    cmake --build build --config Release
    
    Don't forget to replace C:/boost_1_80_0 with where you extracted Boost if you extracted it elsewhere.

About

A wrapper around Valhalla to help you easily generate route instructions fully offline.

Resources

Stars

Watchers

Forks

Packages

No packages published