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

Strange double track segment in GPX export #15684

Closed
dcjkfgdjhd opened this issue May 2, 2024 · 3 comments
Closed

Strange double track segment in GPX export #15684

dcjkfgdjhd opened this issue May 2, 2024 · 3 comments
Assignees
Labels
Feature Request A request for a new feature/function

Comments

@dcjkfgdjhd
Copy link

dcjkfgdjhd commented May 2, 2024

Describe your problem!

When exporting a GPX track from c:geo, the code is strange, for example:

<trk>
    <name>c:geo individual route 2024-05-02T03:16:57Z</name>
    <trkseg>
      <trkpt lat="47.50146" lon="11.137798">
        <name>COORDS! N47 30,088 E11 08,268</name>
      </trkpt>
    </trkseg>
    <trkseg>
      <trkpt lat="47.501479" lon="11.137816" />
      <trkpt lat="47.501514" lon="11.137737" />
      <trkpt lat="47.501573" lon="11.137696" />
      <trkpt lat="47.501622" lon="11.137606" />
      <trkpt lat="47.501724" lon="11.137559" />

I don't understand why there is this strange first track segment with only one point.

One big issue with this is, that Garmin Connect cannot import such GPX files.
Either it only imports the first, quasi empty track segment. Or it bugs completely and does not import at all.

I experimentally removed this first track segment, and now Garmin Connect can import.

(I just got my first Garmin GPS watch, so I am not yet sure if this is the only reason why c:geo exports fail in Connect, but in this one example, the extra track segment definitely was the cause, and it worked after removing that.)

How to reproduce?

See above.

Actual result after these steps?

No response

Expected result after these steps?

No response

Reproducible

Yes

c:geo Version

2024-04-25

System information

No response

Additional Information

No response

@dcjkfgdjhd dcjkfgdjhd added Bug Issues classified as a bug Unverified Issue not yet confirmed/reproduced or feature requests not yet checked for plausibility labels May 2, 2024
@moving-bits
Copy link
Member

this is actually the first item of your individual route. c:geo stores a route internally by segments, with one segment per item of your individual route. The first segment contains of the route's first item only, then each following segment has the next item as last point of that segment, and the points from the last point of the previous segment to the last point of this segment as points of that segment.

I'll look into it, whether I can merge the first near-empty segment into the second segment.

One follow-up question, though, before I dive into that: If you create and individual route with, let's say, five items, the resulting GPX will have five segments. If you delete the first one (single point only) - will then your Garmin cope with the rest (four segments)? Or can it handle single-segment GPX tracks only?

@dcjkfgdjhd
Copy link
Author

One follow-up question, though, before I dive into that: If you create and individual route with, let's say, five items, the resulting GPX will have five segments. If you delete the first one (single point only) - will then your Garmin cope with the rest (four segments)? Or can it handle single-segment GPX tracks only?

OK, I tested this. Garmin Connect (the Android app used for connecting to the watches, not the watch itself) will always just see the first track segment and ignore the rest.

@moving-bits moving-bits added Feature Request A request for a new feature/function and removed Bug Issues classified as a bug Unverified Issue not yet confirmed/reproduced or feature requests not yet checked for plausibility labels May 11, 2024
@moving-bits moving-bits self-assigned this May 11, 2024
@moving-bits
Copy link
Member

PR #15719 will change c:geo to use only a single track segment on exporting an individual route as track

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Feature Request A request for a new feature/function
Projects
None yet
Development

No branches or pull requests

2 participants