A RetroSearch Logo

Home - News ( United States | United Kingdom | Italy | Germany ) - Football scores

Search Query:

Showing content from https://github.com/gis-ops/valhalla-qgis-plugin below:

nilsnolde/valhalla-qgis-plugin: QGIS plugin to use Valhalla for routing, isochrones, matrices & expansion.

QGIS Plugin for the Valhalla routing engine.

It features:

Note

Starting with v3.0.0 this plugin had a complete re-write from scratch. Previously it was loosely based on one of my ex-plugins ORS Tools, but that design has a quite a few shortcomings in terms of UX and aesthetics. The biggest problem is that the dialogs are huge and one can't properly access both the map canvas and the plugin at the same time. Starting with v3.0.0 it's a docked plugin, i.e. arranging itself as a proper panel thanks to the awesome Qt/QGIS APIs.

  1. Select the endpoint/action to "Execute". Note that some endpoints expect multiple waypoints.

  2. Manage the servers which are shown in the "Provider" drop-down

  3. Add/remove/clear waypoints in the table:

  4. Multiple alternatives to add waypoints to the table:

  5. Shows/hides the "Valhalla waypoints" annotation layer

  6. Moves the selected waypoint rows up & down, also updates the "Valhalla waypoints" annotation layer

  7. Set a radius for each waypoint which will snap more roads

  8. Set extra Valhalla waypoint properties in URL query parameter form (i.e.k1=v1&k2=v2), e.g. waiting=1800&date_time=2025-07-25T09:00

  9. Additional costing options to influence the path finding for any endpoint

  10. View the full most recent request, mostly useful when reporting issues, or debugging.

  11. Check the remote graph for admin & timezone DBs (they should exist) and loads the graph extent of the currently set Valhalla server as a polygon layer (if available).

  12. Some information about the plugin and (if available) the currently set Valhalla server.

To run the tests, one needs a locally running Valhalla server with an Andorra graph, e.g.

docker run --rm -dt --name valhalla-router -p 8002:8002 -v $PWD/tests/data:/custom_files -e tileset_name=andorra-tiles ghcr.io/valhalla/valhalla-scripted:latest

python -m unittest discover

In CI we run the tests with the QGIS docker image, have a look there.

Without going into too much detail, this plugin had once a much wider scope. Back when I was still running GIS-OPS, I was a bit obsessed with providing an alternative to ESRI's network analyst, one of the last areas where QGIS is very very far behind ESRI. That's a crazy huge task, especially including all those optimization algorithms. However, we actually did come a pretty long way:

We were also planning to open a web shop where you could buy Valhalla & OSRM graphs right from QGIS and load them locally in a heartbeat. The idea was grand and a lot of OSS was being released as the result of it, e.g. the python bindings to Valhalla & OSRM and Windows support for pyvroom. Sadly the work to get there was grand as well and we never ended up releasing the full plugin.

The current Valhalla plugin still has all the source code though, mostly just commented out. In case anyone ever feels the urge to rival ESRI Network Analyst, please contact me on nilsnolde+github@proton.me.

Originally we wanted to make this plugin work with https://pypi.org/project/pyvalhalla and other Python bindings, so no one would have to install Valhalla locally (QGIS users are not always comfy with that sort of thing).

However, that's not possible with PyPI distributions, because the wheels vendor the dependencies and Valhalla & QGIS share a lot of dependencies. That makes QGIS crash as it's basically UB what happens when two versions of the same library are loaded into the same process.

There are 2 ways to make this work:

  1. either not use the bindings directly, but rather the packaged Valhalla C++ executables. Obvious downside is performance: if used like that, for every single request Valhalla will have to load the relevant graph tiles, because there is of course no persisted cache. On the upside: it's possible today, even including building the graph.
  2. publish Valhalla (with -DENABLE_PYTHON_BINDINGS=ON) on all package management platforms that QGIS uses for distribution. That's of course the harder solution: apt/dnf/pacman for Linux, God knows what we'd need to do or who to bribe for OSX & Win. I saw some vcpkg mentions in the QGIS repo and know Matthias was advocating for it (at least OSX builds), but have no idea about the current state or platform-scope. If vcpkg would be the future of > 90% of QGIS distributions, it could make this option fairly easy.
  3. (yeah right..) Add libvalhalla directly to QGIS and have its functionalities built-in 😄
  1. Some costing options make little sense, e.g. transit, some others we didn't get around to yet. Valhalla is also under constant development, we might miss a few recently added ones. ↩


RetroSearch is an open source project built by @garambo | Open a GitHub Issue

Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo

HTML: 3.2 | Encoding: UTF-8 | Version: 0.7.4