██▒ █▓ ▄▄▄ ██▓ ██░ ██ ▄▄▄ ██▓ ██▓ ▄▄▄
▓██░ █▒▒████▄ ▓██▒ ▓██░ ██▒▒████▄ ▓██▒ ▓██▒ ▒████▄
▓██ █▒░▒██ ▀█▄ ▒██░ ▒██▀▀██░▒██ ▀█▄ ▒██░ ▒██░ ▒██ ▀█▄
▒██ █░░░██▄▄▄▄██ ▒██░ ░▓█ ░██ ░██▄▄▄▄██ ▒██░ ▒██░ ░██▄▄▄▄██
▒▀█░ ▓█ ▓██▒░██████▒░▓█▒░██▓ ▓█ ▓██▒░██████▒░██████▒▓█ ▓██▒
░ ▐░ ▒▒ ▓▒█░░ ▒░▓ ░ ▒ ░░▒░▒ ▒▒ ▓▒█░░ ▒░▓ ░░ ▒░▓ ░▒▒ ▓▒█░
░ ░░ ▒ ▒▒ ░░ ░ ▒ ░ ▒ ░▒░ ░ ▒ ▒▒ ░░ ░ ▒ ░░ ░ ▒ ░ ▒ ▒▒ ░
░░ ░ ▒ ░ ░ ░ ░░ ░ ░ ▒ ░ ░ ░ ░ ░ ▒
░ ░ ░ ░ ░ ░ ░ ░ ░ ░ ░ ░ ░ ░ ░ ░
░
Valhalla is an open source routing engine and accompanying libraries for use with Open Street Map data. This library, Thor, serves as a routing engine backed by tiled open source routing data. The created path can be used as input to the in creating guidance/narrative. The name Thor was chosen as an acronym standing for: Tiled Hierarchical Open Routing and was the foundational idea around which the organization Valhalla and its Norse mythology theme was formed.
Thor uses the GNU Build System to configure and build itself. To install on a Debian or Ubuntu system you need to get its dependencies with:
sudo apt-get install -y autoconf automake libtool make gcc-4.8 g++-4.8 libboost1.54-dev libboost-program-options1.54-dev libboost-filesystem1.54-dev libboost-system1.54-dev protobuf-compiler libprotobuf-dev lua5.2 liblua5.2-dev
Then you should be able to bootstrap the build system:
./autogen.sh
And then run the standard GNU build install:
./configure && make && make install
Please see ./configure --help
for more options on how to control the build process.
For detailed information about what algorithms, data structures and executables are contained within thor, please see the more detailed documentation.
The build will produce both libraries and headers for use in other Valhalla organization projects, however you are free to use Thor for your own projects as well. To simplify the inclusion of the Thor library in another autotoolized project you may make use of thor m4 in your own configure.ac
file. For an exmample of this please have a look at configure.ac
in another one of the valhalla projects. Thor, and all of the projects under the Valhalla organization use the MIT License.
We welcome contributions to thor. If you would like to report an issue, or even better fix an existing one, please use the thor issue tracker on GitHub.
If you would like to make an improvement to the code, please be aware that all valhalla projects are written mostly in C++11, in the K&R (1TBS variant) with two spaces as indentation. We generally follow this c++ style guide. We welcome contributions as pull requests to the repository and highly recommend that your pull request include a test to validate the addition/change of functionality.
We highly encourage running and updating the tests to make sure no regressions have been made. We use the Automake test suite to run our tests by simply making the check
target:
make check
You can also build a test coverage report. This requires that the packages lcov
, gcov
and genhtml
be installed. On Ubuntu you can get these with:
sudo apt-get install lcov
To make the coverage report, configure the build for it:
./configure --enable-coverage
And generate an HTML coverage report in the coverage/
directory:
make coverage-report
Note also that, because calculating the coverage requires compiler support, you will need to clean any object files from a non-coverage build by running make clean
before make coverage-report
.