Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Improve processing of multi-track GPX files #90

Closed
ray66 opened this issue Feb 18, 2024 · 7 comments
Closed

Improve processing of multi-track GPX files #90

ray66 opened this issue Feb 18, 2024 · 7 comments
Labels
component: web UI Controllers, templates and web server type: bug Something isn't working
Milestone

Comments

@ray66
Copy link
Contributor

ray66 commented Feb 18, 2024

When a GPX file contains more than one track, these are processed as one single continuous track. The distance between the last point of a track and the first point of the following track is added to the total distance of the activity. A straight line between the two points is drawn on the map.

It would be nice if tracks would be kept separate for statistics and display. This would allow to have a single GPX file and a single activity per day even when two or more activity stages on the same day are separated from each other e.g. by a train or ferry trip.

@martin-ueding martin-ueding added the type: enhancement New feature or request label Feb 23, 2024
@martin-ueding
Copy link
Owner

A GPX file has a hierarchy of tracks, segments and points. You want to have the different tracks be split into separate activities? If so, how should the names be derived? From the activity path plus something like “track 1”, “track 2”? How would one know if one track is a cycle trip and the other track is a run?

Personally I have separate activity files for such parts of the day and therefore created #94 where I want to provide a combined view for all activities for one day. Your request seems to be the complement of that.

Removing the straight lines is easier. There is already the concept of jumps that occur when there are more than 30 seconds between the points. If you have intermediate train or ferry trips it should already remove those straight lines unless I forgot to honor them somewhere. Do you have an example where this has failed?

@martin-ueding martin-ueding added the status: information needed Further information is requested label Feb 23, 2024
@ray66
Copy link
Contributor Author

ray66 commented Feb 23, 2024

Personally I have separate activity files for such parts of the day and therefore created #94 where I want to provide a combined view for all activities for one day. Your request seems to be the complement of that.

I have one GPX file per day with a track per segment, e.g. one track for the ride from home to the local trains station and another track for the ride from the destination train station back home.

Removing the straight lines is easier. There is already the concept of jumps that occur when there are more than 30 seconds between the points. If you have intermediate train or ferry trips it should already remove those straight lines unless I forgot to honor them somewhere.

This would fit my needs but it does not work for my files.

Do you have an example where this has failed?

The attached file is a striped down example of the above scenario: two short segments with a length of roughly 4kms, distant 46km from each other. geo-activity-playground displays a straight line between the segments and a distance of 50km.

20100711short.gpx.gz

Bildschirmfoto_2024-02-23_11-13-20

@martin-ueding martin-ueding added the component: activity files Parsers for GPX, FIT, KML, TCX, CSV activity files label Mar 1, 2024
@martin-ueding
Copy link
Owner

I've imported your activity into my test space. It does work with the explorer tiles, there is no straight line between the activities:

Screenshot_20240302_082107

But in the maps there is a straight line:

Screenshot_20240302_082123

So the problem is that the segments are separated in the explorer tile computation, but they are not honored on the maps. That is something that I can fix.

@martin-ueding martin-ueding added status: in progress component: web UI Controllers, templates and web server type: bug Something isn't working and removed component: activity files Parsers for GPX, FIT, KML, TCX, CSV activity files status: information needed Further information is requested type: enhancement New feature or request labels Mar 2, 2024
@martin-ueding
Copy link
Owner

That fixed it, will be released with the 0.20.0 release.

Screenshot_20240302_082754
Screenshot_20240302_083250

@martin-ueding martin-ueding added the status: ready for release Fixed but not released yet label Mar 2, 2024
@martin-ueding martin-ueding added this to the 0.20.0 milestone Mar 2, 2024
@martin-ueding
Copy link
Owner

And also the length computation takes the jumps into account now.

Screenshot_20240302_085307

@martin-ueding
Copy link
Owner

Ah, the graphs below were also broken. This is before:

Screenshot_20240302_085749

And this afterwards:

Screenshot_20240302_090548

And also the share picture needed some work. Before:

sharepic-1

And now:

sharepic-2

I think those were all locations where it makes a difference. If I missed something, feel free to reopen this ticket.

@martin-ueding
Copy link
Owner

Version 0.20.0 is released you can update and try it out. If the issue persists, please reopen this ticket.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
component: web UI Controllers, templates and web server type: bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants