brouter-web icon indicating copy to clipboard operation
brouter-web copied to clipboard

Route distance is inaccurate

Open alexcojocaru opened this issue 4 years ago • 3 comments

There is discrepancy between the distance shown in the bottom panel and the distance on the Heightgraph, the former is higher than the latter. I checked against several routes which I have ridden and the Heightgraph calculation is the correct one.

alexcojocaru avatar Jun 05 '21 15:06 alexcojocaru

The bottom stats panel is using values from BRouter, the distance calculation should be here: https://github.com/abrensch/brouter/blob/master/brouter-util/src/main/java/btools/util/CheapRuler.java

The Heightgraph plugin is using Leaflet's function, which should be this: https://github.com/Leaflet/Leaflet/blob/master/src/geo/crs/CRS.Earth.js

See also: brouter#3 cleanup distance calculation Route length calculation slightly off? (OSM Android bikerouting group)

nrenner avatar Jun 05 '21 16:06 nrenner

From what I can see, the BRouter based distance calculation favors performance over accuracy, while the Leaflet based calculation does the opposite.

alexcojocaru avatar Jun 05 '21 19:06 alexcojocaru

This will be fixed by: https://github.com/abrensch/brouter/pull/499

quaelnix avatar Jan 21 '23 18:01 quaelnix