Skip to content

A simple python script to merge GPX files within a target directory

Notifications You must be signed in to change notification settings

jin-zhe/GPXMerge

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

5 Commits
 
 
 
 

Repository files navigation

GPXMerge

A simple python script to merge GPX files within a target directory

About

Sometimes we would like to merge all the tracks, track segments and track points across different GPS Exchange Format (GPX) files. You may want to do this to consolidate GPS data generated by your GPS devices. Merging all your GPX files into a single one allows you to easily visualize the spatial information as one single map layer on a mapping software.

Note that this algorithm

  • Preserves tracks. i.e. it does not merge different tracks under one
  • Filters off track points which are not timestamped
  • Orders track points chronologically under their track segment

Usage

Here's an example to run the script with all available options

python GPXMerge.py -i ./target -o target_merged.gpx -s 30

Options

Longform Shortform Optional Description
--input -i NO Input directory path containing GPX files to be merged
--output -o YES Output path for the merged GPX file. Defaults to be ./[input directory]_merged.gpx
--skip-interval -s YES The interval in track segment at which the track points are taken.

The reason to have a skip interval is to provide user control over the granularity of the merged data. Some GPS devices provide 1Hz data which may be too fine-grained for certain tasks.

About

A simple python script to merge GPX files within a target directory

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages