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

Extract sport field from GPX #9

Open
slackline opened this issue Jun 17, 2024 · 0 comments
Open

Extract sport field from GPX #9

slackline opened this issue Jun 17, 2024 · 0 comments
Labels
enhancement New feature or request

Comments

@slackline
Copy link
Collaborator

Many GPX files will record the activity type directly in the metadata. For example OpenTracks records this in two places as both <type></type> and <opentracks:typeTranslated></opentracks:typeTranslated>...

<?xml version="1.0" encoding="UTF-8"?>
<gpx
version="1.1"
creator="OpenTracks"
xmlns="http://www.topografix.com/GPX/1/1"
xmlns:topografix="http://www.topografix.com/GPX/Private/TopoGrafix/0/1"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns:opentracks="http://opentracksapp.com/xmlschemas/v1"
xmlns:gpxtpx="http://www.garmin.com/xmlschemas/TrackPointExtension/v2"
xmlns:gpxtrkx="http://www.garmin.com/xmlschemas/TrackStatsExtension/v1"
xmlns:cluetrust="http://www.cluetrust.com/Schemas/"
xmlns:pwr="http://www.garmin.com/xmlschemas/PowerExtension/v1"
xsi:schemaLocation="http://www.topografix.com/GPX/1/1 http://www.topografix.com/GPX/1/1/gpx.xsd http://www.topografix.com/GPX/Private/TopoGrafix/0/1 http://www.topografix.com/GPX/Private/TopoGrafix/0/1/topografix.xsd http://www.garmin.com/xmlschem
as/TrackPointExtension/v2 https://www8.garmin.com/xmlschemas/TrackPointExtensionv2.xsd http://www.garmin.com/xmlschemas/PowerExtension/v1 https://www8.garmin.com/xmlschemas/PowerExtensionv1.xsd http://www.garmin.com/xmlschemas/TrackStatsExtension/
v1 http://www.cluetrust.com/Schemas http://www.cluetrust.com/Schemas/gpxdata10.xsd http://opentracksapp.com/xmlschemas/v1 http://opentracksapp.com/xmlschemas/OpenTracks_v1.xsd">
<trk>
<name><![CDATA[2024-06-16T07:41+01]]></name>
<desc><![CDATA[]]></desc>
<type><![CDATA[biking]]></type>
<extensions>
<topografix:color>c0c0c0</topografix:color>
<opentracks:trackid>6d5bc681-400d-45ed-9d43-644c16270605</opentracks:trackid>
<opentracks:typeTranslated><![CDATA[biking]]></opentracks:typeTranslated>

It would be useful if these could be extracted when loading and mapped to the sport field which is required when uploading a track to fittrackee as it would allow batches of GPX tracks to be uploaded automatically without the need to manually add the sport field when doing so as is currently required.

@slackline slackline added the enhancement New feature or request label Jun 17, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

1 participant