Skip to main content

Convert Garmin TPX to GPX

Project description

tcx2gpx

This module converts the Garmin tcx GPS file format to the more commonly used gpx file format. Both formats are a form of XML but there are some fields in the former that are not present in the later. It uses two packages to do the grunt work tcxparser and gpxpy.

Installation

git clone
cd
pip install .

Usage

Single file conversion

For convenience the convert() method runs all steps...

from tcx2gpx import TCX2GPX

gps_object = tcx2gpx.TCX2GPX(tcx_path='file_to_convert.tcx')
gps_object.convert()

If you want to run the steps manually...

gps_object.read_tcx
gps_object.extract_track_points()
gps_object.create_gpx()
gps_object.write_gpx()

If you wish to access individual features then these are simply the @properties or methods of tcxparser, for example...

gps_object.tcx.activity_type
'running'

Batch conversion

Often you will have many files you wish to convert, a convenience wrapper is provided. You specify the --directory that contains the files and they will be converted. It runs jobs in parallel and the number of jobs to be run concurrently can be specified with the -j flag.

python ./batch_convert.py --directory ~/my_tcx_workouts/ -j 6

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Files for tcx2gpx, version 0.1.4
Filename, size File type Python version Upload date Hashes
Filename, size tcx2gpx-0.1.4-py3-none-any.whl (17.0 kB) File type Wheel Python version py3 Upload date Hashes View
Filename, size tcx2gpx-0.1.4.tar.gz (77.4 kB) File type Source Python version None Upload date Hashes View

Supported by

AWS AWS Cloud computing Datadog Datadog Monitoring DigiCert DigiCert EV certificate Facebook / Instagram Facebook / Instagram PSF Sponsor Fastly Fastly CDN Google Google Object Storage and Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Salesforce Salesforce PSF Sponsor Sentry Sentry Error logging StatusPage StatusPage Status page