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

Add elevation to trackpoint attributes #106

Closed
wants to merge 1 commit into from

Conversation

Freelenzer
Copy link
Contributor

I have a gpx file that contains elevation inside of the track point attributes that does not get parsed.

This is the schema definition:

https://www.topografix.com/GPX/1/1/gpx.xsd

This is the file:

https://www.gaiagps.com/hike/259034/gunung-kinabalu-via-timpohon-summit-trail/

<trkpt lat="6.028831" lon="116.547172" ele="1878.0"/>

@vincentneo
Copy link
Owner

This is incorrect.

Elevation data in GPX files should be represented as a child element (with tag <ele>) of the waypoint (or track point <trkpt>, in this case), rather than as an attribute of it.

In the case of your example, it should be represented as:

<trkpt lat="6.028831" lon="116.547172">
    <ele>1878.0</ele>
</trkpt>

@vincentneo vincentneo closed this Apr 26, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants