Map matching: snapping a scatter of fixes onto the right road
In short
Map matching turns a sequence of position fixes, each carrying its own error, into the road segments a vehicle is judged to have driven. It changes the answer to "how far did this truck go": raw fix-to-fix distance sums straight lines between noisy points, matched distance measures road geometry. Only the second belongs on an invoice.
Key takeaways
- Map matching outputs a path over road segments, not a corrected point. The unit of the answer changes.
- Raw fix-to-fix distance under-reports on sparse pings: a straight chord is shorter than the curve it cuts.
- Matched distance is the billable number because it does not move when ping cadence changes.
- Store the road network version and matcher version with every matched path, or the figure is not reproducible.
Map matching turns a sequence of position fixes, each with its own error radius, into a sequence of road segments the vehicle is judged to have travelled. Points go in. What comes out is a path across a road network, with a distance, segment identifiers and a confidence per choice.
That change of unit is the point. A raw fix says "somewhere within 15 metres of here". A matched result says "on this carriageway, heading north, between these 2 junctions" — the form every downstream question needs.
Two families of approach
The simple family snaps each fix independently to the nearest segment. It is cheap, instant and has no memory, so consecutive fixes can land on roads no vehicle could drive between — the output where a truck teleports on and off a service road.
The path-consistent family scores candidates instead. Each fix gets several candidate segments weighted by distance and heading, and each consecutive pair a plausibility score based on whether the network connects them in the observed time. The answer is the best-scoring sequence, not the best choice at any one point — so it improves with hindsight, and an assigned segment can change once later fixes arrive.
That is fine for a trip closed 10 minutes ago and awkward for a live map, so many systems run the cheap snap for display and the careful match for the record.
Why matched distance and raw distance disagree
Raw distance sums the straight-line hops between consecutive fixes. Matched distance is the length of road geometry covered. Both come from the same pings, and they disagree in a direction you can predict from ping interval and road type — systematically, and driven by cadence.
| Ping interval and road | Gap between fixes | Which way raw distance errs |
|---|---|---|
| 5 s, urban delivery round | About 40 m at 30 km/h | Slightly over, from noise on every hop |
| 30 s, motorway curves | About 750 m at 90 km/h | Under: a chord is shorter than its arc |
| 30 s, dense urban with turns | About 250 m at 30 km/h | Well under: whole turns cut across |
| 120 s, any road | 1 to 3 km | Badly under, unusable for billing |
| Roundabouts and grade-separated junctions | Varies | Under: the loop becomes a straight line |
A distance that changes when you change the reporting interval is a measure of your device configuration, not of the journey.
Which number belongs on an invoice
Matched distance, for auditability rather than accuracy. A raw figure cannot be defended in a dispute: the same trip yields a different number under a different cadence policy, and cadence changes with firmware, battery rules and whatever the platform did last quarter.
That discipline also protects the boundary between your figure and your customer's. A partner system accepting your file is a receipt, not agreement on the number inside it — the distinction in the acknowledgement that is not a yes.
Where matching goes confidently wrong
- Parallel service roads. A slip road 20 m from the carriageway, with fixes accurate to 15 m, is a coin toss on every point. Heading and speed usually break the tie; in slow traffic they do not.
- Flyovers and underpasses. A standard network is flat, so an elevated expressway and the road beneath share coordinates. Without a level or bridge attribute there is nothing to work with.
- Multi-level yards and car parks, where several floors project onto one footprint no 2-dimensional network can separate.
- Private roads, new estates and yards absent from the network. The matcher snaps to the nearest public road, possibly 200 m away, and reports the vehicle as driving it.
- Ferries, rail shuttles and low-loader recovery, where the vehicle moves with no road under it and the matcher invents a plausible drive.
- Stationary scatter, which matching does not repair — see the parked truck that keeps moving.
Two upstream decisions cap all of this. Fix accuracy decides how often a tie between 2 nearby roads can be broken at all, one of the honest arguments in installed unit or the driver's phone. And where positions come from decides whether you match at all: some platforms return a matched path and a distance, in which case you inherit their network and matcher — see pulling from the provider or taking the device stream.
Matching is not arrival detection either. A matched path can put a vehicle on the road outside a depot while a geofence sees a fix inside, and reconciling those views is its own diagnosis in arrival fired twice at the gate. Building a trip record that holds raw, matched and versioned data cleanly is the modelling we front-load in MVP and product builds. Related definitions sit in telematics and the live vehicle data plane, inside our logistics and mobility work.
Frequently asked questions
Short answers to the follow-ups this page tends to raise.
What is map matching in GPS tracking?
It is the process of assigning each position fix to the road segment the vehicle was most likely on, and joining those segments into a travelled path. It converts a scatter of uncertain points into something with road identity — a carriageway, a direction, a distance along real geometry.
Why does the GPS path cut across buildings?
Because the line you see joins consecutive fixes directly, and the vehicle drove a road between them. At a 30-second interval a vehicle at 50 km/h moves over 400 m between reports, so the straight line between 2 fixes will cross a park, a river or a block of flats. Matching replaces those hops with the roads that connect them.
Should mileage billing use raw GPS distance or map-matched distance?
Map-matched, because it does not move when your ping cadence does. Raw fix-to-fix distance under-reports as the interval widens and over-reports slightly from noise when it narrows, so the same journey bills differently after a firmware update. Store the network and matcher versions with it.
Can map matching run in real time?
The simple nearest-segment form can, and the path-consistent form runs a few fixes behind by design, because its accuracy comes from evaluating a sequence rather than a point. Most fleet systems run both: an immediate snap for the live map, a careful match once a trip closes.
- map matching
- telematics
- mileage
- road network
The work behind this page
Builds from our portfolio that this page draws on.
Axlebound
Real-time fleet tracking and dispatching platform with full visibility over every vehicle, driver, and route.
LogisticsHaulBoard
An AI freight load board that matches every open load to the best-fit carrier, prices each lane on live spot-rate data, and tracks broker margin on every move.
LogisticsRead next
- The 8 fields in a position report, and the 2 that make it trustworthyA coordinate pair on its own proves almost nothing. The 8 fields around it decide whether a position is evidence, and 2 of them decide whether the other 6 can be believed.definition
- Breadcrumb trail: the line driven, not the line plannedThe trail is what the vehicle reported. The route line is what someone intended. Quoting one when you mean the other is how a mileage or detention dispute gets lost.definition
- Arrival fired twice at the gate, and forty minutes late at the next stopDuplicate arrivals and late arrivals look like one flaky feature and are 3 unrelated faults. Replaying the raw pings for one bad arrival against the polygon tells you which one you have in about ten minutes.diagnostic
- Geofence: a zone, 3 triggers, and the hysteresis that stops it lyingA zone on a map is not a geofence. It becomes one when a trigger rule and a hysteresis policy are attached, and without the second it fires whenever a parked vehicle's fix wanders.definition
- Eleven vehicles have not moved since morning, and the fleet is fineA subset of stale vehicles is almost never a platform outage. Bucketing every vehicle by the age of its newest position, then looking for what the stale set has in common, names the fault in about ten minutes.diagnostic
- Ignition on and off: 1 true signal and its 4 false versionsEvery telematics feed carries an ignition flag. Whether it means the engine is running depends on how it was obtained, and the field itself almost never says.definition
Working on something in this space?
Tell us where you are in a sentence or two. We'll tell you honestly whether we're the right team, and what a sensible first slice of the work looks like.
Start the conversation