brouter-web
brouter-web copied to clipboard
Route distance is inaccurate
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.
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)
From what I can see, the BRouter based distance calculation favors performance over accuracy, while the Leaflet based calculation does the opposite.
This will be fixed by: https://github.com/abrensch/brouter/pull/499