Decode HERE Flexible Polyline
here_flexible_polyline_decodeDecode HERE Flexible Polyline strings into lat/lng point lists for route or isoline geometry, enabling distance checks, bounding boxes, drawing, and stop-on-route validation locally.
Instructions
Decode a HERE Flexible Polyline (the compact geometry returned by HERE Routing v8, Isoline v8 and Map Image v3) into a [lat,lng] point list. Pure local computation — no HERE API call, no quota, no key. Use it when a route/isoline response includes "encoded" polylines and you need coordinates: distances, bounding boxes, drawing, or checking whether a stop lies on the route geometry. Also returns the encoding header (precision, third dimension type) and an optional GeoJSON LineString for direct rendering/mapping. Invalid encodings are rejected with a clear validation error rather than silently producing wrong coordinates.
Tool call template
Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.
{
"id": 1,
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"arguments": {
"encoded": "<encoded>"
},
"name": "here_flexible_polyline_decode"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| encoded | Yes | HERE Flexible Polyline string, e.g. "BFoz5xJ67i1B1B7PzIhaxL7Y" or the "encoded" value from here_route includePolyline. | |
| includeGeoJson | No | Also return a GeoJSON LineString (coordinates in [lng,lat] order per RFC 7946). |