3

I am trying to map match GPS traces onto waterways using the Open Source Routing Machine (OSRM). I have a working set-up, but for some reason some waterways are not being map matched to, eventhough the GPS trace nearly coincides with the waterway.

How can I debug this to find out why OSRM is not matching onto a certain waterway?

What I've tried

JOSM

I've downloaded JOSM and inspected the properties of the problematic waterway. It seems connected correctly to the rest of the network and I could not find any obvious issues. The only property which seemed possible problematic was a "direction" of the waterway.

Reversing trace

To check if the direction of a waterway was the issue I reversed my GPS trace by sorting the data by the unixtime column in descending order and then overwriting the unixtime column by the original. After passing that as the timestamp parameter in the match reques this did not change the output.

OSRM logging

I've set the logging level of OSRM to DEBUG, but this did not yield any helpful messages in the log.

1 Answer 1

1

The community at the osrm-backend repository helped me figure it out:

  • You can view the output of the tile service in e.g. QGIS (version > 3.14). In QGIS you can add it by creating a "vector tile" and providing the OSRM server URL, e.g.: http://host/tile/v1/car/tile({x},{y},{z}).mvt.

    The network can then be inspected further: enter image description here

  • You can run the debug_way.lua script (found in /path/to/osrm-backend-version/profiles). For this you need to install lua, luarocks to install missing packages and perhaps install lua header files (liblua5.3-dev) and/or SSL header files (libssl-dev). The latter are required by some lua packages.

  • Install the OSRM front-end to inspect the network as the OSRM back-end sees it. Relatively easy if you already have a machine with docker, simply set the OSRM_BACKEND environment variable to the location of the back-end you're trying to debug. To get an idea how it looks you can visit the demo server, which also provides this great debug map.

    • Note that due to the age of the Docker image it uses a deprecated call to the Mapbox API for the background tiles. Simply switch to the OSM tiles in the UI to use it.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.