6

Strava and Ride With GPS both show elevation charts, but they show elevation at any particular point in the ride, i.e. on a circular route with 2000m of climbing the charts will go up and down but they will always finish at the same elevation they started.

I'm looking for a way of showing a chart that adds up the ascent/climbing as it goes, so the same route would have a chart that always increased and ended up at 2000m. Is there an easy way to do this for any given GPX file?

10
  • I think I've seen something on one of the many route planners I've tried, but can't recall which (not Komoot or the ones you've mentioned). I'll try to track it down. If the gpx file produced by your chosen tool includes elevation tags, a simple script run on your own pc could give you what you're looking for. Would that be of interest?
    – Chris H
    Commented Sep 7, 2020 at 7:24
  • BTW I have an (ill-defined) concept of the "top" of the ride, which is a location I can recall. It's roughly the top of the last significant climb (or penultimate if the climbing is lots of peaks). This feels like more of a milestone than having done 50% of the climbing, but it's more subjective. Thinking in those terms is easier with the graphs you get routinely
    – Chris H
    Commented Sep 7, 2020 at 7:27
  • You're actually looking for relative cumulative elevation, not absolute. I don't think any site automatically does it, so I'd suggest you get a DEM for the area you cycle in, add the elevations from each point, and then sum these.
    – user33335
    Commented Sep 7, 2020 at 7:36
  • 1
    @ChrisH: indeed, you're correct. I wanted to clear the confusion which arose in the first answer where they offered to find the absolute height sum. Problem is for this question is that many sites get their elevation retrospectively via contour lines (recalculating it based on the path ridden). A measure like this wouldn't be easily displayed/shown/benefitted from so unlikely to have been developed in many engines (but not difficult to do). Put in some support tickets is my suggestion!
    – user33335
    Commented Sep 7, 2020 at 8:50
  • 1
    I've done a little fiddling with a Strava GPX (this route, similar to one I rode recently). Stripping everything but the elevations, calculating the differences, and plotting their cumulative sum works - sort of. The total is a little high: Strava says 2435m, sum is 2580m; if I add in a threshold so I only count the ascent if there's a minimum of 1ft - (despite using metric myself) between points I get 2473m and I can plot a nice graph - but not against distance travelled yet.
    – Chris H
    Commented Sep 7, 2020 at 9:38

2 Answers 2

6

Online

Starting from any route-planning tool that can export GPX, you can do this on my website. It's more about the mapping and planning rides for Veloviewer Explorer, but I've added a graph showing cumulative ascent below the map that displays multiple GPXs. Multiple rides can be plotted, automatically colour coded to match the map. Processing is handled on your own machine using javascript; nothing is uploaded to my server. Just drag and drop the GPX onto the map.

One thing I've noticed is that all route planners have bias in their elevation output, and it's not even the same between what they display and what they download. Komoot, for example, always comes up short, and more so in the GPX than online. As far as I can tell from testing, the loss is evenly spread across the ride, so the ratio of first half to second half climbing (for example) should still be OK.

Screenshot of three routes on a map; below, each routes' cumulative elevation gain is shown in a line graph

The code is also available at GitHub under the most permissive of licenses.

Spreadsheet

Originally I took this as an interesting challenge to my spreadsheet skills. The spreadsheet I created (xlsx, original LibreOffice ods) takes a GPX file pasted into one sheet, on another sheet displays a graph of cumulative elevation, and calculates the distance at which you've done half the climbing.

It doesn't attempt to parse the XML of the GPX file; everything is done in cell formulae. This means that each track point is assumed to look like this and to not have a timestamp (so it works for RideWithGPS and Strava routes, but not Komoot).

<trkpt lat="51.53166" lon="-2.4620100000000003">
    <ele>57.870000000000005</ele>
</trkpt>

This is what the output looks like: Line graph of cumulative elevation gain

10
  • I don't have excel here, so if someone could test that version, that would be great.
    – Chris H
    Commented Sep 7, 2020 at 12:39
  • That's looking pretty good. :) The graph looks how I might expect it to in Excel (or at least the online version of Excel, which should be the same just lacking some menu functions) but the x axis looks like it shows the number of rows in the GPX file, not the distance on km. i.e. the GPX file pasted in down to row 9187 on that sheet, and the x axis goes from 0 to just over 9000. The route is actually around 168km. Don't know if you could debug that without having access to Excel yourself though.
    – Wilskt
    Commented Sep 7, 2020 at 15:58
  • I think something about clearing the input data and replacing it wipes the x axis range. I saw that in libre office too. I doubt excel online would work well for this (I've found it problematic for big files in the past) but I could try - I do have access to that
    – Chris H
    Commented Sep 7, 2020 at 16:08
  • 1
    The charting options are limited online so that's probably going to limit it too. I'll try it on my laptop with the full Excel application and see what it shows, will let you know.
    – Wilskt
    Commented Sep 7, 2020 at 16:23
  • I'm making good progress with a javascript version, tacked on to something I'd already done (plotting multiple GPX routes and KML targets on a map at the same time - new bits not uploaded yet). That may supersede the spreadsheet.
    – Chris H
    Commented Sep 7, 2020 at 21:31
-1

Strava will give you a breakdown of YTD figures on distance, time and elevation.

Strava Screenshot

For this year I’ve covered 9600 ft across all rides, as you can see I don’t go out my way to find hills.

You can find it under your profile settings.

If your handy with spreadsheets you could easily track elevation using data from apps, you could do this via api calls if the 3rd party app allows users access to API.

If they don’t allow API you could still easily log your own data into a spreadsheet.

Alternatively look into reading the fit or tcx files using a suitable editor and pull the elevation data directly from these.

Looking back at Strava it will also give you your elevation gains under each ride / activity.

Strava Screenshot

You can see the highest elevation was less than 400ft but over the course of the ride I covered 837ft.

For simplicity you really can’t beat Strava though for having all that you need though.

3
  • 2
    It may be the wording of the question - I'm looking for something like the graph you posted, for an individual GPX file, but with the line starting from 0 miles and 0ft on the left, and ending up at 35 miles and 837ft on the right, so showing the cumulative total climbing throughout the ride. It would help to show at what point in the ride half the climbing had been done, at any point in the ride how much climbing was left etc. It's difficult if impossible to get that from the standard elevation chart.
    – Wilskt
    Commented Sep 7, 2020 at 6:43
  • Realistically to get what you want from an app starting at 0 elevation you’d effectively have to be at sea level and continue to head in an upwards direction. You won’t get 0 elevation without being at sea level.
    – Dan K
    Commented Sep 7, 2020 at 7:24
  • 2
    It's cumulative ascent, as per the title, so 0ft would be zero climbing done so far, it wouldn't matter what the physical elevation of that point was.
    – Wilskt
    Commented Sep 7, 2020 at 7:51

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.