Elevation Profile

To obtain the elevation of a route, specify return=elevation in addition to return=polyline in your route request.

This will result in a 3D polyline field in each section. This polyline is encoded using Flexible Polyline. This polyline can be easily decoded in many major languages using examples available in the Flexible Polyline respository.

The decoded polyline will be a series of 3D coordinates consisting of (latitude, longitude, elevation).

Example

curl -X GET \
  'https://router.hereapi.com/v8/routes?origin=47.584247,11.055542&transportMode=pedestrian&destination=47.589299,11.060172&return=polyline,elevation'
{
  "routes": [
    {
      "id": "b9d2f0ce-3f53-414d-8242-47e513ccf704",
      "sections": [
        {
          "arrival": {
            "place": {
              "location": {
                "elv": 913.0,
                "lat": 47.5891592,
                "lng": 11.0600794
              },
              "originalLocation": {
                "lat": 47.589299,
                "lng": 11.0601719
              },
              "type": "place"
            }
          },
          "departure": {
            "place": {
              "location": {
                "elv": 1257.0,
                "lat": 47.5846303,
                "lng": 11.0546708
              },
              "originalLocation": {
                "lat": 47.5842469,
                "lng": 11.0555419
              },
              "type": "place"
            }
          },
          "id": "da6175a8-c8ca-4440-b227-1644539c9768",
          "polyline": "B2Fs3q46C-k3iV0xYkQsJ3DiKwb3DsFmmBzFUuN7B2E4M7B_BuVvCrFuRvC1G6SjDAouBnGsD4Q7B2E4M7BrJiIvC3I4SjD4MVvC4OsDvCuP6UrEiQ2GjDsDsJ7BhG2CThK_DvC_FrDnBhMgCvC3K4KvC_DuP7BgCgCT2GhI7B4K_B7BsJsH7BsL4S3D1KpD7B3IU7BrLuLvCkciMzFiIiK7BrLsFvCrH2G7BiKgC7B2IsD7B1GgGnB4MkU3D4QkUrEhQgCjDtNiGvCuRiSrEsHsFnBrFiEnB5UhGrEkQ4Q3D5WsFrE4O4Q3DkSuNrEsH2I7BtT1E3DjOsDvCiK4MvC4KsFvC4KgG7B2K6S3DrPhEjD3MAvCrJ2E7BsL4IvC6UiKrE2EsJnBtPAjDrL2EvC3GuN7BiKgEvCrH4K7B4KgG7B4U2GrE4K4IvCsHiQvCsBmYjDgCwjB_E4Mo9C7L4OmgB_E4W4OrEuN2IvCW1EAgI5WA4ErJAhClkBoBiChKAgGhMA2E3OU_F1CAgGvVU2E3UU2ChKT2EtNAiG2CTA_FUiKh_BoBgGvZUsFhKAsFrJA2G3MAA1EAsBrHUW1EAA1GUgC1EAsH3MUgCrLU_BjMUhE_FA2CtNU1CtXoB1CxpB8BzCzpBoBkOluBwC",
          "transport": {
            "mode": "pedestrian"
          },
          "type": "pedestrian"
        }
      ]
    }
  ]
}

The decoded polyline is:

[(47.58463, 11.054671, 1257),
(47.584888, 11.054821, 1251),
(47.585049, 11.055261, 1245),
(47.585135, 11.055872, 1236),
(47.585145, 11.056087, 1233),
(47.58522, 11.056291, 1230),
(47.585188, 11.056634, 1226),
(47.585102, 11.056913, 1222),
(47.584995, 11.057214, 1217),
(47.584995, 11.057954, 1207),
(47.585049, 11.058222, 1204),
(47.585124, 11.058426, 1201),
(47.584974, 11.058555, 1197),
(47.584834, 11.058855, 1192),
(47.585038, 11.058844, 1188),
(47.585274, 11.058898, 1184),
(47.585521, 11.059231, 1177),
(47.585778, 11.059338, 1172),
(47.585832, 11.059488, 1169),
(47.585735, 11.059531, 1168),
(47.585574, 11.059467, 1164),
(47.585478, 11.059413, 1162),
(47.585285, 11.059445, 1158),
(47.585113, 11.059617, 1154),
(47.585049, 11.059864, 1151),
(47.585081, 11.059896, 1150),
(47.585188, 11.059767, 1147),
(47.58536, 11.059735, 1144),
(47.58551, 11.059853, 1141),
(47.585692, 11.060153, 1135),
(47.585521, 11.0601, 1132),
(47.585381, 11.06011, 1129),
(47.585199, 11.060293, 1125),
(47.585649, 11.060486, 1116),
(47.585778, 11.060647, 1113),
(47.585596, 11.060733, 1109),
(47.585478, 11.06084, 1106),
(47.585639, 11.060872, 1103),
(47.585778, 11.060926, 1100),
(47.585671, 11.061022, 1098),
(47.585875, 11.061344, 1092),
(47.586143, 11.061666, 1085),
(47.585886, 11.061698, 1080),
(47.585671, 11.061795, 1076),
(47.58595, 11.062084, 1069),
(47.586068, 11.06217, 1067),
(47.585982, 11.062235, 1065),
(47.585649, 11.062138, 1058),
(47.585907, 11.062406, 1052),
(47.585542, 11.062492, 1045),
(47.585778, 11.06276, 1039),
(47.586068, 11.062975, 1032),
(47.586186, 11.063114, 1029),
(47.585875, 11.063039, 1023),
(47.585649, 11.063093, 1019),
(47.58581, 11.063297, 1015),
(47.585982, 11.063383, 1011),
(47.586154, 11.063479, 1008),
(47.586325, 11.06378, 1002),
(47.586079, 11.063715, 997),
(47.585875, 11.063715, 993),
(47.585725, 11.06379, 990),
(47.585907, 11.06393, 986),
(47.58624, 11.064091, 979),
(47.586315, 11.064241, 977),
(47.586068, 11.064241, 972),
(47.585886, 11.064316, 968),
(47.585778, 11.064531, 965),
(47.585939, 11.064595, 961),
(47.585821, 11.064767, 958),
(47.585993, 11.064863, 955),
(47.586325, 11.06497, 948),
(47.586497, 11.06511, 944),
(47.586615, 11.065367, 940),
(47.586637, 11.065754, 935),
(47.586669, 11.066322, 927),
(47.586873, 11.067814, 908),
(47.587109, 11.068329, 900),
(47.587473, 11.068565, 893),
(47.587688, 11.068704, 889),
(47.587699, 11.068629, 889),
(47.587827, 11.068264, 889),
(47.587903, 11.068114, 889),
(47.58787, 11.067535, 891),
(47.587903, 11.067374, 891),
(47.587999, 11.067181, 891),
(47.588074, 11.066945, 892),
(47.587978, 11.066902, 892),
(47.588074, 11.066558, 893),
(47.588149, 11.066226, 894),
(47.588192, 11.066065, 893),
(47.588267, 11.06585, 893),
(47.588364, 11.065893, 892),
(47.588364, 11.065797, 893),
(47.588525, 11.064788, 895),
(47.588621, 11.06438, 896),
(47.588707, 11.064219, 896),
(47.588793, 11.064069, 896),
(47.5889, 11.063865, 896),
(47.5889, 11.06379, 896),
(47.588922, 11.063672, 897),
(47.588933, 11.063597, 897),
(47.588933, 11.06349, 898),
(47.588965, 11.063415, 898),
(47.589083, 11.063211, 899),
(47.589115, 11.063029, 900),
(47.589083, 11.062835, 901),
(47.589018, 11.062739, 901),
(47.589061, 11.062524, 902),
(47.589018, 11.062149, 904),
(47.588975, 11.061484, 907),
(47.588933, 11.060818, 909),
(47.589159, 11.060079, 913), ]

results matching ""

    No results matching ""