How to get list of points in map matching

There is result of map matching:

{
“hints”: {},
“info”: {
“copyrights”: [“GraphHopper”, “OpenStreetMap contributors”],
“took”: 0
},
“paths”: [{
“distance”: 1186.432,
“weight”: 9.223372036854775E12,
“time”: 132329,
“transfers”: 0,
“points_encoded”: true,
“bbox”: [82.610595, 49.9504, 82.614311, 49.952866],
“points”: “{~zoHy_fwN}FrCqDgVdBlLfAm@c@_DGWFVPlArDyARDHJTK_BwA~AvAUJtAbJf@W”,
“instructions”: [{
“distance”: 151.585,
“heading”: 339.67,
“sign”: 0,
“interval”: [0, 1],
“text”: “Continue onto Кайсенова улица”,
“time”: 9919,
“street_name”: “Кайсенова улица”
}, {
“distance”: 283.561,
“sign”: 2,
“interval”: [1, 2],
“text”: “Turn right onto улица Александра Протозанова”,
“time”: 18556,
“street_name”: “улица Александра Протозанова”
}

],
“legs”: [],
“details”: {},
“ascend”: 0.0,
“descend”: 0.0,
“snapped_waypoints”: “”
}
],
“map_matching”: {
“original_distance”: 934.9019794809506,
“distance”: 1186.4323742575618,
“time”: 132329
}
}

But how to get Lat/Lng of points?

You have to decode the String in points. For more information see the parameter points_encoded https://github.com/graphhopper/graphhopper/blob/master/docs/web/api-doc.md#parameters

1 Like
Powered by Discourse