Map matching service

DesignHard50 minGoogle and Uber style

Your task

Design a map-matching service that snaps noisy GPS traces to the road network. Input is a stream of raw GPS points (each with a lat/lng and accuracy radius, sampled every 1-5 seconds, sometimes drifting 20-50m off the true road, sometimes dropping out in tunnels). Output is the actual sequence of road segments the vehicle traveled. This feeds ETA, trip pricing, and driver-quality scoring, so accuracy matters. The service must handle 100k concurrent trips and produce matched segments in near real time. Describe the matching algorithm, how you handle ambiguity at junctions and parallel roads, and the latency vs accuracy trade-off of online vs offline matching.

It covers

  • Hmm
  • Gps noise
  • Road snapping