TL;DR: map matching works fine, except for a random point at the end of the trip that is hundreds of kilometers away from the rest.
I got map matching installed and running and I thrilled!
I have imported the OSM maps using the following command :
java -jar matching-web/target/graphhopper-map-matching-web-1.0-SNAPSHOT.jar import quebec-latest.osm.pbf
And I have used R to convert the first of the 5000 bike trips to GPX using the following commands:
trip5000 <- sf::read_sf(here::here(“content/post/data/downloads/trip5000.json”))
mls <- sf::st_cast(trip5000$geometry[], “MULTIPOINT”)
z <- data.frame(id = “prout”, x = mls[,1], y = mls[,2])
pgirmess::writeGPX(z, filename = “original.gpx”, type = “t”)
I then matched the points to the map using this command:
java -jar matching-web/target/graphhopper-map-matching-web-1.0-SNAPSHOT.jar match original.gpx
If you look at the last point in the matched.gpx file, it a degree of longitude East of the final point in the original file.
<trkpt lat=“45.330068” lon="-72.814216">2020-01-29T03:11:50Z