Route GuidesRoutes City GuidesCities Map Log in

Export elevation profile for a route

20 Apr 2022
Find a better bike route. Try our map & route-planner »

Become a supporter

Was wondering if it would be possible to add a function to export distance/elevation data of a route to a CSV or JSON file.  Ideally just a text representation of the elevation plot.

Would help for me to get this data into a spreadsheet so I can plot climbing effort (and descending!) along a long route to give better estimates of checkpoint times.

Comments

Sun 24 Apr 2022, 17:48

Would the KML download work? If you have the elevation plot showing and download as KML, that’s essentially CSV (ok, with a few extra lines at top and bottom!); each line is longitude, latitude, and elevation.

Sun 24 Apr 2022, 20:29

Oh, I'll try that.

I guess if I want to do the distance along the route I can use the haversine formula for each pair of points.

Thanks!

Sun 24 Apr 2022, 20:37

Just tried and unfortunately all the elevation data is zero

<coordinates>

-0.08028,51.43728,0

-0.08141,51.43685,0

-0.08111,51.43650,0

-0.08086,51.43620,0

Sun 24 Apr 2022, 22:43

Haversine is definitely the way forward – that’s what c.t uses under the hood too!

Do you have the elevation on-screen when you download the KML? It’ll only include it in the download if the graph is actually showing.

Sun 24 Apr 2022, 22:52

Ah, there we go.

<coordinates>

-0.08028,51.43728,52

-0.08141,51.43685,51

-0.08111,51.43650,52

-0.08086,51.43620,54

-0.08034,51.43563,57

-0.08000,51.43523,60

-0.07982,51.43486,63