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.

Source Distribution

tcx2gpx-0.1.4.tar.gz (77.4 kB view hashes)

Uploaded Source

Built Distribution

tcx2gpx-0.1.4-py3-none-any.whl (17.0 kB view hashes)

Uploaded Python 3

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page