Route Match Extension API Developer's Guide

Example GPX Trace

The customer has a GPS trace from a vehicle drive in GPX format, and wants to know which route the vehicle has actually taken. To display the route and to access the road attributes, the trace points must match the most probable path on the HERE map.

Request

curl
--request POST
-H "Content-Type: application/binary"
--data-binary "@C:\temp\trace001.gpx"
"https://rme.cit.api.here.com
/2/matchroute.json
?routemode=car
&app_id={YOUR_APP_ID}
&app_code={YOUR_APP_CODE}
"

Response

A success response contains a JSON object as shown below. It contains a list of route links, trace points, warnings, as well as the map version.

{
  "RouteLinks":[
    {
      "linkId":-828692902,
      "functionalClass":3,
      "shape":"50.4546089 30.5209694 50.4544411 30.5210896","linkLength":18.44
    },
    {
      "linkId":-828692901,
      "functionalClass":3,
      "shape":"50.4544411 30.5210896 50.4541702 30.5212898","linkLength":29.93
    },
    {
      "linkId":-812246707,
      "functionalClass":3,
      "shape":"50.4541702 30.5212898 50.4538689 30.5214996","linkLength":32.95
    },
    ...
    {
      "linkId":820289492,
      "functionalClass":1,
      "shape":"51.1187286 31.1718597 51.1205597 31.17239 51.1219177 31.1727829","linkLength":324.13
    }
  ],
  "TracePoints":[
    {
      "lat":50.4552744,
      "lon":30.5213118,
      "latMatched":50.4546089,
      "lonMatched":30.5209694,
      "linkIdMatched":-828692902,
      "confidenceValue":0.94,
      "matchDistance":4.59,
      "routeLinkSeqNrMatched":10,
      "elevation":0,
      "speedMps":0,
      "headingDegreeNorthClockwise":10000,
      "timestamp":0,
      "headingMatched":25.217234923243595,
      "minError":1.2405405512432781
    },
    {
      "lat":50.4550313,
      "lon":30.5205023,
      "latMatched":50.4546089,
      "lonMatched":30.5209694,
      "linkIdMatched":-828692902,
      "confidenceValue":0.51
      "matchDistance":4.59,
      "routeLinkSeqNrMatched":10,
      "elevation":0,
      "speedMps":0,
      "headingDegreeNorthClockwise":10000,
      "timestamp":0,
      "headingMatched":25.217234923243595,
      "minError":1.2405405512432781
    },
    {
      "lat":50.4548468,
      "lon":30.5198264,
      "latMatched":50.4546089,
      "lonMatched":30.5209694,
      "linkIdMatched":-828692902,
      "confidenceValue":0.87
      "matchDistance":4.59,
      "routeLinkSeqNrMatched":10,
      "elevation":0,
      "speedMps":0,
      "headingDegreeNorthClockwise":10000,
      "timestamp":0,
      "headingMatched":25.217234923243595,
      "minError":1.2405405512432781
    },
    ...
    {
      "lat":51.1219164,
      "lon":31.1727833,
      "latMatched":51.12191,
      "lonMatched":31.17278,
      "linkIdMatched":820289492,
      "confidenceValue":0.53
      "matchDistance":4.59,
      "routeLinkSeqNrMatched":10,
      "elevation":0,
      "speedMps":0,
      "headingDegreeNorthClockwise":10000,
      "timestamp":0,
      "headingMatched":25.217234923243595,
      "minError":1.2405405512432781
    }
  ],
  "Warnings":[
    {
      "tracePointSeqNum": 1,
      "routeLinkSeqNum": 2,
      "category": 1005,
      "text": "Tracepoint #0 moved by 83 meter onto the route"
    }
  ],
  "MapVersion":"17116"
}