GPX/GIS Python Program


Tkinter Choose GPX Program Window

Gpx Converter uses Tkinter to open a file browser to select files for processing. You can:
* Convert a GPX file into a CSV (text file)
* Convert a GPX file into a shape file
* Convert a CSV file into a GPX file
* Convert a shape file into a GPX file
* Convert a GPX file of multiple tracks into single track with multiple segments
* Break up a single line GPX file into multiple lines
* Round off GPX lat/lon coordinates was tested on Linux OS with Python 3.4.2 and Tkinter 8.5.

Button icons can be displayed by unzipping the image file (near bottom of this page) and placing the files in the image folder (created the first time you run the program).

GPX Choose Arguments Window

GPX_Converter v53e2 utilizes modules from osgeo. You will need to install the python3-gdal package (python2-gdal package will not work). GPX_Converter allows the user to choose configuration files in a popup, letting the user choose different option formats as needed.

An additional checkbox has been added. Now, if converting a track GPX file into a shape file, you can choose whether to create a track point shapefile in addition to a linestring shapefile.

GPX_Converter will set up the necessary folder (gpx_converter_53) and subfolders in your home directory and will create argument and option configuration files from default values. Simply download and start to use it. You can customize various user preferences in the program USER_SETTINGS and in the config files (in the config subfolder).

CSV to GPX Option Window

Left: Select option window for CSV2GPX

If you are trouble shooting it works well to open the program in a terminal instead of using a launcher. The terminal will stay open and give you helpful error messages.

More information on using can be found in hints.txt.

You can run by using the command:

A sample waypoint CSV output is below. You can customize headings and columns.

Below is another data set opened in Libre Office Calc:

Here is a zip file of images for the button display. You can use your own small .gif files for decoration. The images in the zip file are 16px x 16px. Download: images5buttons.tar.gz

I've made a Python time converter function,, that can be used independently from the program. It takes a GPX time string, <time>2016-09-08T19:01:46Z</time>, an input time zone integer, and an output time zone integer. The argument string just needs time units separated by something, not necessarily a GPX time format. The function returns Local Time in a tupel containing ints (NOT strings) of year, month, day, hour, minutes, seconds. You can convert a GPX UTC time string to your local time by using an input zone of 0 (UTC time zone) and an output zone that you want. Making this function was more fun than trying to figure out the Python library or external time libraries! Include the function in your program and call it with: time2time(timestring,zonein,zoneout).
For instance:
x = time2time('',0 ,5)
(2017, 5, 22, 1, 17, 59)