osmandapp / OsmAnd

OsmAnd
https://osmand.net
Other
4.73k stars 1.03k forks source link

"Use elevation" Walking routing finds shorter route #14379

Closed mokelly closed 2 years ago

mokelly commented 2 years ago

🐞 routing report

Routing engine

Routing Profile

Pedestrian, comparing "Use elevation" on or off

Start and end points

From Sawtooth Trailhead to Guitar Lake campground

Actual and expected routes

With "Use elevation" on, OSMAnd found a short route (42.5 miles). With "Use elevation" off, OSMAnd took a longer route (48.2 miles). I expected the reverse, with the "Use elevation" feature sometimes finding a longer route that avoided steep slopes.

Strangely, the longer route also has bigger elevation changes (13k' climb vs 10k' climb). The behavior was the same with the suboptions "Hilly", "Less Hilly" and "Flat".

Is this a regression?

This route worked as expected in the 4.1.x series. I tested and found this same behavior in 4.2.0 and 4.2.1.

🌍 Your Environment

OsmAnd Version:

4.2.1

Device and Android/iOS version:

Galaxy S20, Android 12

Maps used (online or offline):

vshcherb commented 2 years ago

Route data. https://osmand.net/map?start=36.453275%2C-118.596752&end=36.572264%2C-118.314605&mode=pedestrian#10/36.5373/-117.9601

Use elevation data: Route: 68.2 km, 23:11. Cost: 108793

Without elevation data Route: 68.2 km, 17:04. Cost: 51421

Same route actually

vshcherb commented 2 years ago

To be honest I didn't manage to generate longer routes as it mentioned so I assume the issue is already fixed in 4.2

mokelly commented 2 years ago

Hi, vshcherb. I tested using 4.2.1 from the Google Play Store beta program. Were you using a later version?

On Wed, May 25, 2022 at 3:36 PM vshcherb @.***> wrote:

To be honest I didn't manage to generate longer routes as it mentioned so I assume the issue is already fixed in 4.2

β€” Reply to this email directly, view it on GitHub https://github.com/osmandapp/OsmAnd/issues/14379#issuecomment-1137914864, or unsubscribe https://github.com/notifications/unsubscribe-auth/AALESEOA6P5BQDLJCK3J3RTVL2TN7ANCNFSM5W3DEGWA . You are receiving this because you authored the thread.Message ID: @.***>

vshcherb commented 2 years ago

That's a bit strange... We will retest on android version to be sure with latest maps.

mokelly commented 2 years ago

Thanks! In case it matters, I was using the latest monthly California map set, and the most recent downloadable contours.

On Wed, May 25, 2022 at 3:43 PM vshcherb @.***> wrote:

That's a bit strange... We will retest on android version to be sure with latest maps.

β€” Reply to this email directly, view it on GitHub https://github.com/osmandapp/OsmAnd/issues/14379#issuecomment-1137919040, or unsubscribe https://github.com/notifications/unsubscribe-auth/AALESENUOW4H47DKMZJIKL3VL2UJRANCNFSM5W3DEGWA . You are receiving this because you authored the thread.Message ID: @.***>

vshcherb commented 2 years ago

Point of 2 alternatives routes: North - use elevation data. Route: 72.4 km, 25:08. Cost: 129081 Uphill 3695 m, Downhill 2816 m South - use elevation data. Route: 71.8 km, 24:13. Cost: 124586 Uphill 3412 m, Downhill 2553 m North - no elevation data. Route: 72.8 km, 18:13. Cost: 54631 Uphill 3684 m, Downhill 2913 m South - no elevation data .Route: 71.8 km, 17:58. Cost: 54139 Uphill 3302 m, Downhill 2547 m

mokelly commented 2 years ago

@vshcherb , is that a confirmation of my bug report? I see that "North - use elevation data" finds a shorter and slightly steeper route than with "no elevation data".

mokelly commented 2 years ago

I found one cause of my unexpected results. In Navigation Settings / Route parameters / Prefer I had "Prefer hiking routes" set. The 42.5 mile route uses a short stretch of road, which is avoided by the 48.2 mile route. When I uncheck "Prefer hiking routes", the shorter 42.5 mile route is found in both cases.

Is it a bug that "Use elevation" doesn't respect "Prefer hiking routes"? I recall it doing so in 4.1.x; or at least that the road-less route was found with either setting in that version.

vshcherb commented 2 years ago

No, it's confirming there is no bug. Use / not use elevation data here is not critical difference cause in both cases you need to make +900m (uphill), the main difference that north route might have less steep uphills, so it's usually more preferrable by (72.8-71.8) = 1 km distance which is around 2% of the route distance.

mokelly commented 2 years ago

Thanks for looking into this!

On Tue, Jun 7, 2022, 9:37 AM vshcherb @.***> wrote:

No, it's confirming there is no bug. Use / not use elevation data here is not critical difference cause in both cases you need to make +900m (uphill), the main difference that north route might have less steep uphills, so it's usually more preferrable by (72.8-71.8) = 1 km distance which is around 2% of the route distance.

β€” Reply to this email directly, view it on GitHub https://github.com/osmandapp/OsmAnd/issues/14379#issuecomment-1148908870, or unsubscribe https://github.com/notifications/unsubscribe-auth/AALESELQ47IU7SHTTF5FU7LVN53FVANCNFSM5W3DEGWA . You are receiving this because you authored the thread.Message ID: @.***>