tkrajina/gpxpy

Incremental distance / length?

tomfrankkirk opened this issue · 0 comments

Sorry if I'm being thick and there is an obvious answer for this.
I'm looking to get a running distance within a track. Ie, for each GPX point, the distance covered so far within that track.

Clearly, the various length(), length_2d(), length_3d() methods could do this, but they return a single flattened value (a reduction operation) whereas I would like the running total (aka cumulative sum I think?).

Happy to make the edit and submit a PR, just thought I would check first.
Thanks.