// the find
graphhopper/map-matching
The map matching functionality is now located in the main repository https://github.com/graphhopper/graphhopper#map-matching
A standalone Java library and web service that snaps noisy GPS traces to road networks using OpenStreetMap data and the GraphHopper routing engine. It implements the Newson-Krumm hidden Markov model approach with Viterbi decoding — the standard algorithm for this problem. This repo is now archived; the functionality was merged into the main GraphHopper repo in late 2020.
The HMM implementation is textbook-correct: emission probabilities from GPS error distributions, transition probabilities from actual routing distances between candidates, Viterbi for optimal path recovery. The hmm-lib is vendored separately and reusable on its own. The web service layer is thin and practical — you can POST a GPX and get back snapped JSON or GPX in one curl call. Test coverage includes edge cases like U-turns, loops, and sparse traces.
This repo is a dead end — the README explicitly says development moved to the main GraphHopper repo, and the last commit here is 2020. Adopting this directly means you inherit abandoned code. The OSM import step requires downloading and indexing a PBF file locally, so there's no lightweight path to just snapping a few points without standing up a full GraphHopper instance. No support for real-time streaming — it's batch GPX only, which is fine for post-processing but useless for live tracking. The Java 8 requirement and Maven-only build will feel dated in any modern JVM stack.