You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardexpand all lines: README.md
+29-8
Original file line number
Diff line number
Diff line change
@@ -9,7 +9,7 @@
9
9
░ ░ ░ ░ ░ ░ ░ ░ ░ ░ ░ ░ ░ ░ ░ ░
10
10
░
11
11
12
-
Valhalla is an open source routing engine and accompanying libraries for use with Open Street Map data.
12
+
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 name [Thor](http://en.wikipedia.org/wiki/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.
13
13
14
14
Build Status
15
15
------------
@@ -19,30 +19,51 @@ Build Status
19
19
Building
20
20
--------
21
21
22
-
Valhalla uses the [GNU Build System](http://www.gnu.org/software/automake/manual/html_node/GNU-Build-System.html) to configure and build itself and has a number of useful dependencies already included for convenience such as: [Boost libraries](http://boost.org/), [Protobuf](https://github.com/google/protobuf/), [cURL](http://curl.haxx.se/), [ZeroMQ](http://zeromq.org/), [SQLite](http://sqlite.org/), and [Lua](http://www.lua.org/). To install on a Debian or Ubuntu system, please first install the prerequisites:
22
+
Thor uses the [GNU Build System](http://www.gnu.org/software/automake/manual/html_node/GNU-Build-System.html) to configure and build itself. To install on a Debian or Ubuntu system you need to get its dependencies with:
Then you should be able to bootstrap the build system:
27
27
28
28
./autogen.sh
29
29
30
30
And then run the standard GNU build install:
31
31
32
-
./configure --enable-coverage && make && make install
32
+
./configure && make && make install
33
33
34
34
Please see `./configure --help` for more options on how to control the build process.
35
35
36
36
Using
37
37
-----
38
38
39
-
For convenience valhalla has a main executable, `valhalla`, that makes use of the library it builds. The purpose of this executable to serve as a starting point for building several custom executables against the various custom libraries.
39
+
For detailed information about what algorithms, data structures and executables are contained within thor, please see the more [detailed documentation](docs/index.md).
40
+
41
+
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](m4/valhalla_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](COPYING).
40
42
41
43
Contributing
42
44
------------
43
45
44
-
We welcome contributions to valhalla. If you would like to report an issue, please use the [valhalla issue tracker](https://github.com/mapzen/valhalla/issues) on GitHub.
46
+
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](https://github.com/valhalla/thor/issues) on GitHub.
47
+
48
+
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](http://google-styleguide.googlecode.com/svn/trunk/cppguide.html). We welcome contributions as pull requests to the [repository](https://github.com/valhalla/thor) and highly recommend that your pull request include a test to validate the addition/change of functionality.
49
+
50
+
Tests
51
+
-----
52
+
53
+
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:
54
+
55
+
make check
56
+
57
+
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:
58
+
59
+
sudo apt-get install lcov
60
+
61
+
To make the coverage report, configure the build for it:
62
+
63
+
./configure --enable-coverage
64
+
65
+
And generate an HTML coverage report in the `coverage/` directory:
45
66
46
-
If you would like to make an improvement to the code, please be aware that valhalla is written mostly in C++11, in the K&R (1TBS variant) with two spaces as indentation. We generally follow this [C++ Style Guide](http://google-styleguide.googlecode.com/svn/trunk/cppguide.html). We welcome contributions as pull requests to the [repository](https://github.com/mapzen/valhalla).
67
+
make coverage-report
47
68
48
-
It is possible to build a test coverage report, please see [test coverage documentation](docs/test_coverage.md) for details.
69
+
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`.
Valhalla is a collection of libraries and binaries (named after Norse mythological figures) created with the intetion of providing a flexible opeen street map based routing infrastructure. We endeavor to do much more than this describes but we'll flesh out the docs to explain each piece as the project matures.
6
-
7
-
## Building ##
8
-
9
-
Valhalla does have several dependencies that you must have before configure will properly produce a Makefile. It is true that many of these dependencies are not actually needed to build the valhalla code however we left the dependencies in because we forsee having to use them at some point or another of the course of the projects development.
10
-
11
-
## Testing ##
12
-
13
-
Tests can be found in the `tests/` directory, and are run by autotools when you run `make check`. If you are preparing a pull request or patch, please make sure these pass before submitting it.
14
-
15
-
There is a test coverage tool built into the build system, but it's fairly annoying to use. Please see
16
-
[the coverage docs](test_coverage.md) for more information and details on running it.
3
+
The thor library is essentially a set of various data structures and alogrithms which deal with things like: A* graph traversal, edge costing, vertex costing and path construction.
17
4
18
5
## Components ##
19
6
20
-
### Mjolnir ###
21
-
22
-
A command line tool for cutting route tiles directly from [OSM Pbf](http://wiki.openstreetmap.org/wiki/PBF_Format) or from an [osm2pgsql] (http://wiki.openstreetmap.org/wiki/Osm2pgsql) import (which is useful for changeset/diff application).
23
-
24
-
#### osm2pgsql ####
25
-
26
-
To import a small dataset such as that of Liechtenstein you'll first need to install osm2pgsql like so:
27
-
28
-
#get deps, compile, test, and install osm2pgsql. you only need to do this once
What follows are some notable components of the thor library.
49
8
50
-
Note that for applying diff's you won't need `createdb`, `psql` or the `--create` bits.
9
+
### PathAlgorithm ###
51
10
52
-
### Util ###
11
+
TODO:
53
12
54
-
The Valhalla library comes with some examples of standard utilities that may or may not be applicable for a given project. They are mostly just intented as an example of what you might use to build a library within autotools.
13
+
### AdjacencyList ###
55
14
56
-
## Tests ##
57
-
Valhalla comes with a test suite, run with ``make check``. If you find a platform where the tests aren't passing [open an issue](https://github.com/mapzen/valhalla/issues/new).
0 commit comments