MapMatching adds a final point far from the original end

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.


Hey everyone,

I got map matching installed and running and I thrilled!

I have downloaded the OSM maps for the province of Quebec and 5000 bike trips in Montreal.

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[[1]], “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

I have uploaded the original.gpx and the matched.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.

matched.gpx:

2020-01-29T03:11:45Z
<trkpt lat=“45.330068” lon=“-72.814216”>2020-01-29T03:11:50Z

Any idea?

I am facing the same issue. You can of course just remove the last point, but this doesn’t seem right. Did you find what is causing this?