Logistics & Mobility// definition

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 roadGap between fixesWhich way raw distance errs
5 s, urban delivery roundAbout 40 m at 30 km/hSlightly over, from noise on every hop
30 s, motorway curvesAbout 750 m at 90 km/hUnder: a chord is shorter than its arc
30 s, dense urban with turnsAbout 250 m at 30 km/hWell under: whole turns cut across
120 s, any road1 to 3 kmBadly under, unusable for billing
Roundabouts and grade-separated junctionsVariesUnder: the loop becomes a straight line
The raw-to-matched gap by ping interval and road type

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
// shipped work

The work behind this page

Builds from our portfolio that this page draws on.

Read next

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