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.
-
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
-
Download Boost and extract it somewhere (example:
$HOME/Downloads/boost_1_80_0
) -
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
-
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 themake
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.
- Install Xcode 14.
- 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.
- Install Git by running the following the following command in Terminal and proceeding through the prompt to install Git (if any):
git --version
- Install Brew.
- Install CMake by running the following command in Terminal:
brew install cmake
- Download Boost and extract it somewhere (example:
$HOME/Downloads/boost_1_80_0
) - 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
- Build Lotyr by running the following commands in the same Terminal:
Don't forget to replace
cmake -B build -DCMAKE_BUILD_TYPE=Release -DBOOST_ROOT=$HOME/Downloads/boost_1_80_0 make -C build -j$(sysctl -n hw.physicalcpu)
$HOME/Downloads/boost_1_80_0
with where you extracted Boost if you extracted it elsewhere.
- Install Visual Studio, Git, and CMake.
- Download Boost for Windows and extract it somewhere (example:
C:/boost_1_80_0
) - 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
- Build Lotyr by running the following commands in the same Command Prompt:
Don't forget to replace
cmake -B build -DCMAKE_BUILD_TYPE=Release -DBOOST_ROOT=C:/boost_1_80_0 cmake --build build --config Release
C:/boost_1_80_0
with where you extracted Boost if you extracted it elsewhere.