Skip to content

cycling-moutain router sometimes reports invalid elevations #2273

@aviax8

Description

@aviax8

Is there an existing issue for this?

  • I have searched the existing issues

Where did you encounter this issue?

live API

Request URL

https://api.openrouteservice.org/v2/pdirections/cycling-mountain/geojson

POST Request Body

{"coordinates":[[17.6067066192627,49.33320487690934],[17.655286788940433,49.337483514536736]],"elevation":true,"instructions_format":"html","extra_info":["surface","steepness","waytype"],"language":"en","units":"km","preference":"recommended","alternative_routes":{"target_count":3,"share_factor":0.6,"weight_factor":1.4}}

Response

Response
{
  "type": "FeatureCollection",
  "bbox": [
    17.606712,
    49.327365,
    0,
    17.65522,
    49.338093,
    563
  ],
  "features": [
    {
      "bbox": [
        17.606712,
        49.327365,
        276.5,
        17.65522,
        49.337477,
        563
      ],
      "type": "Feature",
      "properties": {
        "ascent": 296.4,
        "descent": 16.5,
        "segments": [
          {
            "distance": 4.377,
            "duration": 943.6,
            "steps": [
              {
                "distance": 0.039,
                "duration": 7.8,
                "type": 11,
                "instruction": "Head east on <b>49012</b>",
                "name": "49012",
                "way_points": [
                  0,
                  1
                ]
              },
              {
                "distance": 0.029,
                "duration": 6.6,
                "type": 1,
                "instruction": "Turn right",
                "name": "-",
                "way_points": [
                  1,
                  3
                ]
              },
              {
                "distance": 0.1,
                "duration": 22.5,
                "type": 0,
                "instruction": "Turn left",
                "name": "-",
                "way_points": [
                  3,
                  5
                ]
              },
              {
                "distance": 0.806,
                "duration": 161.1,
                "type": 12,
                "instruction": "Keep left",
                "name": "-",
                "way_points": [
                  5,
                  10
                ]
              },
              {
                "distance": 0.005,
                "duration": 1,
                "type": 0,
                "instruction": "Turn left",
                "name": "-",
                "way_points": [
                  10,
                  11
                ]
              },
              {
                "distance": 0.284,
                "duration": 56.7,
                "type": 3,
                "instruction": "Turn sharp right",
                "name": "-",
                "way_points": [
                  11,
                  16
                ]
              },
              {
                "distance": 1.757,
                "duration": 390.5,
                "type": 12,
                "instruction": "Keep left",
                "name": "-",
                "way_points": [
                  16,
                  67
                ]
              },
              {
                "distance": 1.34,
                "duration": 292.2,
                "type": 0,
                "instruction": "Turn left",
                "name": "-",
                "way_points": [
                  67,
                  85
                ]
              },
              {
                "distance": 0.017,
                "duration": 5.2,
                "type": 0,
                "instruction": "Turn left",
                "name": "-",
                "way_points": [
                  85,
                  86
                ]
              },
              {
                "distance": 0,
                "duration": 0,
                "type": 10,
                "instruction": "Arrive at your destination, on the right",
                "name": "-",
                "way_points": [
                  86,
                  86
                ]
              }
            ],
            "ascent": 296.3934326171875,
            "descent": 16.4769287109375
          }
        ],
        "extras": {
          "waytype": {
            "values": [
              [
                0,
                1,
                2
              ],
              [
                1,
                5,
                3
              ],
              [
                5,
                86,
                5
              ]
            ],
            "summary": [
              {
                "value": 5,
                "distance": 0.004,
                "amount": 96.16
              },
              {
                "value": 3,
                "distance": 0,
                "amount": 2.95
              },
              {
                "value": 2,
                "distance": 0,
                "amount": 0.89
              }
            ]
          },
          "surface": {
            "values": [
              [
                0,
                10,
                0
              ],
              [
                10,
                19,
                10
              ],
              [
                19,
                77,
                0
              ],
              [
                77,
                83,
                10
              ],
              [
                83,
                86,
                0
              ]
            ],
            "summary": [
              {
                "value": 0,
                "distance": 0.003,
                "amount": 77.09
              },
              {
                "value": 10,
                "distance": 0.001,
                "amount": 22.91
              }
            ]
          },
          "steepness": {
            "values": [
              [
                0,
                10,
                1
              ],
              [
                10,
                11,
                3
              ],
              [
                11,
                16,
                2
              ],
              [
                16,
                17,
                5
              ],
              [
                17,
                24,
                4
              ],
              [
                24,
                26,
                5
              ],
              [
                26,
                36,
                2
              ],
              [
                36,
                45,
                4
              ],
              [
                45,
                56,
                2
              ],
              [
                56,
                72,
                3
              ],
              [
                72,
                86,
                1
              ]
            ],
            "summary": [
              {
                "value": 1,
                "distance": 0.001,
                "amount": 33.07
              },
              {
                "value": 3,
                "distance": 0.001,
                "amount": 29.91
              },
              {
                "value": 2,
                "distance": 0.001,
                "amount": 20.52
              },
              {
                "value": 4,
                "distance": 0.001,
                "amount": 14.35
              },
              {
                "value": 5,
                "distance": 0,
                "amount": 2.16
              }
            ]
          }
        },
        "way_points": [
          0,
          86
        ],
        "summary": {
          "distance": 4.377,
          "duration": 943.6
        }
      },
      "geometry": {
        "type": "LineString",
        "coordinates": [
          [
            17.606712,
            49.333218,
            276.5
          ],
          [
            17.607229,
            49.333124,
            277
          ],
          [
            17.607149,
            49.332947,
            277
          ],
          [
            17.607061,
            49.332893,
            277
          ],
          [
            17.607236,
            49.332181,
            278.3
          ],
          [
            17.607356,
            49.332021,
            279
          ],
          [
            17.608827,
            49.331407,
            280.6
          ],
          [
            17.609121,
            49.331305,
            283
          ],
          [
            17.612187,
            49.330898,
            286.5
          ],
          [
            17.612436,
            49.330848,
            286.1
          ],
          [
            17.617709,
            49.329528,
            317
          ],
          [
            17.617755,
            49.329562,
            317
          ],
          [
            17.618412,
            49.328483,
            326.3
          ],
          [
            17.618539,
            49.328213,
            328.2
          ],
          [
            17.619008,
            49.32771,
            327.9
          ],
          [
            17.619135,
            49.327648,
            330
          ],
          [
            17.61974,
            49.32752,
            338
          ],
          [
            17.620188,
            49.327627,
            350.8
          ],
          [
            17.621888,
            49.327841,
            356.2
          ],
          [
            17.622317,
            49.32785,
            358
          ],
          [
            17.622529,
            49.327842,
            372.9
          ],
          [
            17.62315,
            49.327645,
            374.3
          ],
          [
            17.623531,
            49.3275,
            375.3
          ],
          [
            17.62381,
            49.327414,
            375.1
          ],
          [
            17.623897,
            49.327403,
            386
          ],
          [
            17.624366,
            49.327365,
            394.3
          ],
          [
            17.624965,
            49.327387,
            395.8
          ],
          [
            17.62537,
            49.327442,
            397.3
          ],
          [
            17.625685,
            49.32745,
            397.3
          ],
          [
            17.625917,
            49.327513,
            398.1
          ],
          [
            17.626076,
            49.327603,
            399.5
          ],
          [
            17.626484,
            49.328143,
            402.1
          ],
          [
            17.626646,
            49.328272,
            402.9
          ],
          [
            17.627099,
            49.328517,
            405.5
          ],
          [
            17.62742,
            49.328634,
            408.9
          ],
          [
            17.627924,
            49.328756,
            411.9
          ],
          [
            17.628951,
            49.329055,
            424.4
          ],
          [
            17.629297,
            49.329135,
            428.2
          ],
          [
            17.629571,
            49.329159,
            430.3
          ],
          [
            17.629996,
            49.329139,
            435
          ],
          [
            17.630437,
            49.329056,
            437.8
          ],
          [
            17.630741,
            49.32904,
            439.6
          ],
          [
            17.63101,
            49.329059,
            441.2
          ],
          [
            17.631342,
            49.329161,
            444.7
          ],
          [
            17.631831,
            49.329446,
            449.4
          ],
          [
            17.632081,
            49.329513,
            450.6
          ],
          [
            17.632333,
            49.329545,
            451.7
          ],
          [
            17.632546,
            49.329538,
            454.3
          ],
          [
            17.632702,
            49.329513,
            455.1
          ],
          [
            17.633015,
            49.329401,
            459
          ],
          [
            17.633404,
            49.329171,
            459.1
          ],
          [
            17.633609,
            49.329077,
            461.3
          ],
          [
            17.634211,
            49.328909,
            467.5
          ],
          [
            17.63458,
            49.328863,
            469.4
          ],
          [
            17.635595,
            49.328997,
            470.2
          ],
          [
            17.636052,
            49.329112,
            469.8
          ],
          [
            17.636222,
            49.329211,
            469.6
          ],
          [
            17.637191,
            49.330164,
            480.7
          ],
          [
            17.637464,
            49.33033,
            486
          ],
          [
            17.637676,
            49.330405,
            487
          ],
          [
            17.638663,
            49.330692,
            489.3
          ],
          [
            17.638831,
            49.330731,
            488.5
          ],
          [
            17.639073,
            49.330741,
            496
          ],
          [
            17.639424,
            49.330715,
            499.7
          ],
          [
            17.639926,
            49.330618,
            499.4
          ],
          [
            17.64048,
            49.330446,
            499.2
          ],
          [
            17.640747,
            49.330338,
            498.9
          ],
          [
            17.640876,
            49.330254,
            498
          ],
          [
            17.642193,
            49.330426,
            500.8
          ],
          [
            17.643278,
            49.330692,
            507
          ],
          [
            17.644554,
            49.331216,
            507
          ],
          [
            17.646289,
            49.332172,
            541.7
          ],
          [
            17.64699,
            49.332413,
            542.9
          ],
          [
            17.64736,
            49.332804,
            539.9
          ],
          [
            17.647718,
            49.333319,
            540.8
          ],
          [
            17.648113,
            49.333694,
            540.3
          ],
          [
            17.648828,
            49.334034,
            540.8
          ],
          [
            17.649134,
            49.334162,
            541
          ],
          [
            17.649861,
            49.334467,
            551
          ],
          [
            17.650206,
            49.334662,
            558
          ],
          [
            17.651557,
            49.33561,
            556.8
          ],
          [
            17.652208,
            49.335971,
            556
          ],
          [
            17.65337,
            49.336502,
            561.5
          ],
          [
            17.654551,
            49.337241,
            563
          ],
          [
            17.65476,
            49.337283,
            559.5
          ],
          [
            17.65522,
            49.337323,
            556
          ],
          [
            17.655193,
            49.337477,
            556.4
          ]
        ]
      }
    },
    {
      "bbox": [
        17.606712,
        49.330957,
        0,
        17.65522,
        49.338093,
        563
      ],
      "type": "Feature",
      "properties": {
        "ascent": 880.5,
        "descent": 600.6,
        "segments": [
          {
            "distance": 4.161,
            "duration": 922.8,
            "steps": [
              {
                "distance": 0.184,
                "duration": 36.9,
                "type": 11,
                "instruction": "Head east on <b>49012</b>",
                "name": "49012",
                "way_points": [
                  0,
                  8
                ]
              },
              {
                "distance": 1.097,
                "duration": 239.1,
                "type": 12,
                "instruction": "Keep left",
                "name": "-",
                "way_points": [
                  8,
                  32
                ]
              },
              {
                "distance": 0.173,
                "duration": 34.6,
                "type": 12,
                "instruction": "Keep left",
                "name": "-",
                "way_points": [
                  32,
                  36
                ]
              },
              {
                "distance": 0.456,
                "duration": 111.3,
                "type": 1,
                "instruction": "Turn right",
                "name": "-",
                "way_points": [
                  36,
                  43
                ]
              },
              {
                "distance": 1.103,
                "duration": 248.2,
                "type": 12,
                "instruction": "Keep left",
                "name": "-",
                "way_points": [
                  43,
                  55
                ]
              },
              {
                "distance": 0.654,
                "duration": 147.2,
                "type": 13,
                "instruction": "Keep right",
                "name": "-",
                "way_points": [
                  55,
                  77
                ]
              },
              {
                "distance": 0.477,
                "duration": 100.3,
                "type": 0,
                "instruction": "Turn left",
                "name": "-",
                "way_points": [
                  77,
                  83
                ]
              },
              {
                "distance": 0.017,
                "duration": 5.2,
                "type": 0,
                "instruction": "Turn left",
                "name": "-",
                "way_points": [
                  83,
                  84
                ]
              },
              {
                "distance": 0,
                "duration": 0,
                "type": 10,
                "instruction": "Arrive at your destination, on the right",
                "name": "-",
                "way_points": [
                  84,
                  84
                ]
              }
            ],
            "ascent": 880.5265197753906,
            "descent": 600.6100158691406
          }
        ],
        "extras": {
          "waytype": {
            "values": [
              [
                0,
                1,
                2
              ],
              [
                1,
                5,
                3
              ],
              [
                5,
                86,
                5
              ]
            ],
            "summary": [
              {
                "value": 5,
                "distance": 0.004,
                "amount": 96.16
              },
              {
                "value": 3,
                "distance": 0,
                "amount": 2.95
              },
              {
                "value": 2,
                "distance": 0,
                "amount": 0.89
              }
            ]
          },
          "surface": {
            "values": [
              [
                0,
                10,
                0
              ],
              [
                10,
                19,
                10
              ],
              [
                19,
                77,
                0
              ],
              [
                77,
                83,
                10
              ],
              [
                83,
                86,
                0
              ]
            ],
            "summary": [
              {
                "value": 0,
                "distance": 0.003,
                "amount": 77.09
              },
              {
                "value": 10,
                "distance": 0.001,
                "amount": 22.91
              }
            ]
          },
          "steepness": {
            "values": [
              [
                0,
                10,
                1
              ],
              [
                10,
                11,
                3
              ],
              [
                11,
                16,
                2
              ],
              [
                16,
                17,
                5
              ],
              [
                17,
                24,
                4
              ],
              [
                24,
                26,
                5
              ],
              [
                26,
                36,
                2
              ],
              [
                36,
                45,
                4
              ],
              [
                45,
                56,
                2
              ],
              [
                56,
                72,
                3
              ],
              [
                72,
                86,
                1
              ]
            ],
            "summary": [
              {
                "value": 1,
                "distance": 0.001,
                "amount": 33.07
              },
              {
                "value": 3,
                "distance": 0.001,
                "amount": 29.91
              },
              {
                "value": 2,
                "distance": 0.001,
                "amount": 20.52
              },
              {
                "value": 4,
                "distance": 0.001,
                "amount": 14.35
              },
              {
                "value": 5,
                "distance": 0,
                "amount": 2.16
              }
            ]
          }
        },
        "way_points": [
          0,
          84
        ],
        "summary": {
          "distance": 4.161,
          "duration": 922.8
        }
      },
      "geometry": {
        "type": "LineString",
        "coordinates": [
          [
            17.606712,
            49.333218,
            276.5
          ],
          [
            17.607229,
            49.333124,
            277
          ],
          [
            17.607482,
            49.333082,
            0
          ],
          [
            17.607796,
            49.333014,
            247.3
          ],
          [
            17.608415,
            49.332787,
            236.3
          ],
          [
            17.608583,
            49.332753,
            231.6
          ],
          [
            17.608792,
            49.332737,
            226.3
          ],
          [
            17.608974,
            49.332746,
            220.4
          ],
          [
            17.609106,
            49.332773,
            279
          ],
          [
            17.609113,
            49.332776,
            0
          ],
          [
            17.609231,
            49.332824,
            0
          ],
          [
            17.609314,
            49.332858,
            279
          ],
          [
            17.609657,
            49.332964,
            280
          ],
          [
            17.60988,
            49.332997,
            280.1
          ],
          [
            17.610077,
            49.333005,
            280.3
          ],
          [
            17.610304,
            49.332992,
            280.2
          ],
          [
            17.610673,
            49.332947,
            281
          ],
          [
            17.611642,
            49.332784,
            284
          ],
          [
            17.612874,
            49.332581,
            288.3
          ],
          [
            17.614199,
            49.332421,
            293
          ],
          [
            17.61451,
            49.332397,
            293
          ],
          [
            17.615805,
            49.332483,
            295
          ],
          [
            17.616692,
            49.332576,
            302.2
          ],
          [
            17.617566,
            49.332498,
            302.4
          ],
          [
            17.617873,
            49.332441,
            301.9
          ],
          [
            17.618213,
            49.332314,
            305
          ],
          [
            17.618951,
            49.332002,
            313.8
          ],
          [
            17.620146,
            49.331538,
            319.4
          ],
          [
            17.620538,
            49.33135,
            319.3
          ],
          [
            17.620973,
            49.331254,
            324
          ],
          [
            17.622439,
            49.330992,
            326
          ],
          [
            17.623033,
            49.330957,
            330.3
          ],
          [
            17.623444,
            49.331012,
            335
          ],
          [
            17.623699,
            49.331092,
            336.8
          ],
          [
            17.624016,
            49.331249,
            340.5
          ],
          [
            17.624972,
            49.331791,
            341.7
          ],
          [
            17.625208,
            49.332032,
            354
          ],
          [
            17.625744,
            49.33207,
            354
          ],
          [
            17.626967,
            49.33222,
            363
          ],
          [
            17.62742,
            49.332276,
            370.7
          ],
          [
            17.629062,
            49.332564,
            380.9
          ],
          [
            17.629689,
            49.332719,
            384
          ],
          [
            17.630148,
            49.332904,
            384
          ],
          [
            17.631155,
            49.333241,
            388
          ],
          [
            17.632526,
            49.333687,
            388
          ],
          [
            17.634524,
            49.334444,
            441.5
          ],
          [
            17.635345,
            49.334615,
            439.2
          ],
          [
            17.637026,
            49.334776,
            436.4
          ],
          [
            17.637549,
            49.334877,
            435
          ],
          [
            17.638239,
            49.33501,
            456
          ],
          [
            17.639609,
            49.335411,
            472.7
          ],
          [
            17.641759,
            49.336737,
            489
          ],
          [
            17.643024,
            49.337379,
            498.6
          ],
          [
            17.643683,
            49.337606,
            504.4
          ],
          [
            17.644105,
            49.337733,
            503.5
          ],
          [
            17.644295,
            49.337867,
            503
          ],
          [
            17.644695,
            49.337942,
            514.1
          ],
          [
            17.645216,
            49.338083,
            514.2
          ],
          [
            17.645424,
            49.338093,
            514.4
          ],
          [
            17.645552,
            49.338074,
            514.4
          ],
          [
            17.64565,
            49.33804,
            515.6
          ],
          [
            17.645757,
            49.337951,
            516.7
          ],
          [
            17.646341,
            49.337185,
            523.6
          ],
          [
            17.646537,
            49.336845,
            530.4
          ],
          [
            17.646731,
            49.336664,
            533.8
          ],
          [
            17.646963,
            49.336555,
            533.8
          ],
          [
            17.647768,
            49.336257,
            538
          ],
          [
            17.647954,
            49.336158,
            539.4
          ],
          [
            17.648057,
            49.335986,
            540.1
          ],
          [
            17.648165,
            49.335599,
            543.6
          ],
          [
            17.648257,
            49.335446,
            544.1
          ],
          [
            17.648426,
            49.335392,
            544.5
          ],
          [
            17.648697,
            49.335421,
            545.7
          ],
          [
            17.648911,
            49.33549,
            545.9
          ],
          [
            17.649176,
            49.33547,
            547
          ],
          [
            17.649508,
            49.335366,
            548.3
          ],
          [
            17.649839,
            49.334974,
            550.7
          ],
          [
            17.650206,
            49.334662,
            558
          ],
          [
            17.651557,
            49.33561,
            556.8
          ],
          [
            17.652208,
            49.335971,
            556
          ],
          [
            17.65337,
            49.336502,
            561.5
          ],
          [
            17.654551,
            49.337241,
            563
          ],
          [
            17.65476,
            49.337283,
            559.5
          ],
          [
            17.65522,
            49.337323,
            556
          ],
          [
            17.655193,
            49.337477,
            556.4
          ]
        ]
      }
    }
  ],
  "metadata": {
    "attribution": "openrouteservice.org | OpenStreetMap contributors",
    "service": "routing",
    "timestamp": 1777555171638,
    "query": {
      "coordinates": [
        [
          17.6067066192627,
          49.33320487690934
        ],
        [
          17.655286788940433,
          49.337483514536736
        ]
      ],
      "profile": "cycling-mountain",
      "profileName": "cycling-mountain",
      "preference": "recommended",
      "format": "geojson",
      "units": "km",
      "language": "en",
      "instructions_format": "html",
      "elevation": true,
      "extra_info": [
        "surface",
        "steepness",
        "waytype"
      ],
      "alternative_routes": {
        "target_count": 3,
        "weight_factor": 1.4,
        "share_factor": 0.6
      }
    },
    "engine": {
      "version": "9.8.0",
      "build_date": "2026-03-30T12:24:04Z",
      "graph_date": "2026-04-28T05:37:06Z",
      "osm_date": "2026-04-20T00:00:00Z"
    }
  }
}

Current behavior

The ascent and descent values for the alternative route are invalid due to invalid elevations.

The route ascends almost the entire time, yet the response contains "ascent": 880.5 and "descent": 600.6.
This is due to invalid (zero) elevations:

          [
            17.607229,
            49.333124,
            277
          ],
          [
            17.607482,
            49.333082,
            0
          ],
          [
            17.607796,
            49.333014,
            247.3
          ],

Other route profiles, such as cycling-regular and foot-*, calculate the elevations fine.

Expected behavior

Valid elevations and ascent/descent calculation for the mountain-bike routes.

Openrouteservice Version

9.8.0

Build date

2026-03-30T12:24:04Z

Graph date

2026-04-28T05:37:06Z

Forum Topic Link

No response

Metadata

Metadata

Assignees

No one assigned

    Type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions