██▒ █▓ ▄▄▄ ██▓ ██░ ██ ▄▄▄ ██▓ ██▓ ▄▄▄
▓██░ █▒▒████▄ ▓██▒ ▓██░ ██▒▒████▄ ▓██▒ ▓██▒ ▒████▄
▓██ █▒░▒██ ▀█▄ ▒██░ ▒██▀▀██░▒██ ▀█▄ ▒██░ ▒██░ ▒██ ▀█▄
▒██ █░░░██▄▄▄▄██ ▒██░ ░▓█ ░██ ░██▄▄▄▄██ ▒██░ ▒██░ ░██▄▄▄▄██
▒▀█░ ▓█ ▓██▒░██████▒░▓█▒░██▓ ▓█ ▓██▒░██████▒░██████▒▓█ ▓██▒
░ ▐░ ▒▒ ▓▒█░░ ▒░▓ ░ ▒ ░░▒░▒ ▒▒ ▓▒█░░ ▒░▓ ░░ ▒░▓ ░▒▒ ▓▒█░
░ ░░ ▒ ▒▒ ░░ ░ ▒ ░ ▒ ░▒░ ░ ▒ ▒▒ ░░ ░ ▒ ░░ ░ ▒ ░ ▒ ▒▒ ░
░░ ░ ▒ ░ ░ ░ ░░ ░ ░ ▒ ░ ░ ░ ░ ░ ▒
░ ░ ░ ░ ░ ░ ░ ░ ░ ░ ░ ░ ░ ░ ░ ░
░
Valhalla is an open source routing engine and accompanying libraries for use with OpenStreetMap data. Valhalla also includes tools like time+distance matrix computation, isochrones, elevation sampling, map matching and tour optimization (Travelling Salesman).
| Linux | macOS | Windows | Code Coverage | Timezone DB |
|---|---|---|---|---|
While we absolutely accept AI usage for Valhalla (and its related projects), we require the following guidelines to be followed:
2. & 3. are pretty subjective, where we have a lot more patience. However, PRs ignoring these guidelines entirely, might be closed without further notice. And the worst offenders might get blocked from the Valhalla organization.
Valhalla, and all of the projects under the Valhalla organization, use the MIT License. Avatar/logo by Jordan.
OpenStreetMap data in the ./test/data is licensed under ODbL and copyrighted by OSM contributors. Additional information on licenses and other requirements concerning the data sources most frequently used by Valhalla can be found in the docs.
There are several key features that we hope can differentiate the Valhalla project from other routing and network analysis engines. They are:
FOSSGIS e.V. hosts a demo server which is open to the public and includes a full planet graph with an open-source web app on https://valhalla.openstreetmap.de. The HTTP API is accessible on a slightly different subdomain, e.g. https://valhalla1.openstreetmap.de/isochrone. Usage of the demo server follows the usual fair-usage policy as OSRM & Nominatim demo servers (somewhat enforced by rate limits).
[!NOTE] In case you publish apps to end users (be it mobile, web or desktop) which request to the public demo server, we'd ask you to let us know via Github Discussions and to include an identifying
X-Client-Idrequest header, e.g.X-Client-Id: newroutingapp.io.
Valhalla is fully functional on many Linux and Mac OS distributions, and is also used on iOS and Android devices.
For Windows, not all functionality is fully supported yet. Building the Valhalla library works flawlessly, as well as the following application modules:
TOOLS: utilities to query and benchmark various componentsDATA_TOOLS: utilities to build input data and handle transitPYTHON_BINDINGS: use all actions (route, isochrones, matrix etc) via the Valhalla Python library (needs a full (i.e. development) Python distribution in the PATH)The Valhalla organization is comprised of several library modules each responsible for a different function. The layout of the various modules is as follows:
loki and thor.mjolnir or as a standalone service.thor.odin.tyr.odin and support json (and eventually protocol buffer) output.Documentation is stored in the docs/ folder in this GitHub repository. It can be viewed at valhalla.github.io/valhalla.
For more information on binaries, see Command Line Tools section below and the docs.
If you want to build Valhalla from source, follow the documentation.
To run Valhalla locally or your own server, we recommend using one of our Docker images, see the README.
We publish our (very) high-level Python bindings to PyPI with pyvalhalla.
The Python packages don't only contain the Python bindings, they also provide access to the C++ executables, e.g. in the form of python -m valhalla valhalla_build_tiles -h. For more details, see the Python README.
To install the native C++ executables one doesn't even need to have root permissions or even have Python installed. Simply download the desired wheel from PyPI, extract it with e.g. unzip and run the included valhalla/bin/<binary> directly.
We provide high-level NodeJS binding:
npm install @valhallajs/valhallajs
For more details, see the NodeJS README.
We :heart: contributions to Valhalla. They could be non-technical, e.g. translations into other languages (see locales/) or documentation improvements, or technical ones like bug fixes or feature implementations. It's important to open an issue before setting out to work on a PR.
Ideally, get familiar with our Contribution guidelines first.
[!TIP] Easily install various Valhalla command line tools like
valhalla_build_tilesorvalhalla_servicewith the Python bindings.
valhalla_service aka one-shot modeIf you can't (e.g. Windows Server) or don't want to have the full-fledged HTTP API running, you can have the (almost) exact same behavior with the 'valhalla_service' executable in so-called "one-shot" mode. It's simple, just pass the config file, the action (route, isochrone, matrix etc) and the stringified JSON request (or alternatively a file containing the request to circumvent shell command length issues):
valhalla_service valhalla.json isochrone '{"locations":[{"lat":42.552448,"lon":1.564865}],"costing":"auto","contours":[{"time":10,"color":"ff0000"}], "show_locations":true}'
# Alternatively you can pass a file with the same contents
valhalla_service valhalla.json isochrone isochrone_request.txt
It's important to note that all Valhalla logs for one-shot mode are piped to stderr while the actual JSON response will be in stdout. To completely silence the logs, pass type: "" to midgard.logging in the config file.
The following projects are open-source and built with the intention to make it easier to use Valhalla and its features:
mjolnir.default_speeds_config config option.valhalla_service and valhalla_build_tiles.| 日期 | 榜单 | 排名 | 周期新增 | 总 STAR |
|---|