Map Matching API

map matching example GPS signals and/or coordinates can often be imprecise – as a result, GPS points may lay outside the route that was driven. This complicates the exact tracking, analyzing, and projecting of a route.

Based on the underlying road network and (optional) metadata, the Kapsch Map Matching API can match a given set of location points to identified road links and determine the most likely driven route. The API can also be used to snap GPS points to toll sections and geofences. Data in all environments – from highways to cities – can be processed.

Matching location data to the road network allows you to:
  • Detect entry/exit of geofences (virtual boundaries set up around geographical locations)
  • Match vehicle routes to toll sections
  • Track assets
  • Compare planned and driven routes
  • Monitor driving behavior and performance
  • Understand traffic flows on highways and in cities
  • Calculate vehicle emissions

Our Map Matching API is based on the Open Street Map road network - the most accurate, up-to-date, and feature-rich open-source geodata source, with over 1.5 million contributors across the world.

The API results produce a set of matched points and a geometry of the matched route. Identifiers of the road network are linked, which can be used for further processing of the data. In addition, the API:
  • Can be used in individual countries as well as on entire continents.
  • Applies different algorithms to provide optimized response times.
  • Offers batch-stateless map matching of geo-coordinates together with other metadata such as speed, heading, and horizontal accuracy of GNSS reading (note: any provided metadata is optional, yet does significantly improve the map matching results).

You want to know what's new? See API changelog

Get started!

Base URL address: https://api.geo-location-platform.com/roadnetwork/europe/v1/matchroute
GPX format of GNSS track is supported. See GPX format.
Use POST method on above endpoint and send GPX data as a request body.
Endpoint requires authentication. API_KEY needs to be provided to you by Kapsch TrafficCom. Please contact us for API usage conditions and to acquire your API_KEY. Usage of 'demo' API_KEY in examples on this page is not allowed for your productive systems.

Please contact us and request a trial account if you are interested to see how the map matching performs.

Request must be in XML format of GPX schema and contain these types of data:

'trk'->'trkseg'->'trkpt' attributes
  • "lat" - latitude of GNSS reading
  • "lon" - longitude of GNSS reading
'trk'->'trkseg'->'trkpt' elements
  • "time" - GNSS reading timestamp in UTC - ISO-8601
  • "course" - heading in degrees (0-359)
  • "speed" - speed in meters per second (MPS)
  • "e:horaccur" - horizontal accuracy of every GNSS position in meters. E.g. value of 3m means that position is within 9m radius with 99.73% probability. This value is not to be confused with HDOP. If horizontal accuracy is not available from GNSS device, please set this value to 0 for every position to disable horizontal accuracy in the map matching algorithm.

Response contains two types of data:

Route Links - A list matched links which together define matched route:
  • "linkId" - id of a road link matched
  • "confidence" - confidence level of map matched link, from 0.01 to 1.00
  • "shape" - shape of the partially matched link with coordinate pairs for reconstructing a polyline
  • "linkLength" - length of the matched link
  • "entryTimestamp" - entry timestamp of the partially matched link
  • "exitTimestamp" - exit timestamp of the partially matched link
  • "startOffset" - partially matched link starts at this offset
  • "endOffset" - partially matched link ends at this offset
Trace Points - A list of successfully map matched points with structure like:
  • "timestamp" - timestamp of the map matched point
  • "lat" - original latitude
  • "lon" - original longitude
  • "accuracy" - horizontal accuracy
  • "linkIdMatched" - id of a road link matched with this point
  • "confidenceValue" - level of confidence of map matching, from 0.00 to 1.00
  • "latMatched" - latitude of map matched point
  • "lonMatched" - longitude of map matched point
  • "speedMps" - speed
  • "matchOffsetOnLink" - offset of matched point from the start of the link, from 0.00 to 0.999
  • "headingDegreeNorthClockwise" - original heading in degrees
  • "routeLinkSeqNrMatched" - sequence of matched point
  • "warningCode" - warning code gives hints about the map matching confidence

Request example:

Response example: