Through riding my bike and running with my GPS, I have collected a lot of GPS tracks in the form of GPX files. Being the data-loving person that I am, I wanted to see where I have ridden and how frequently I have ridden there. When I started this project back in 2011, I was unable to find anything online or offline that would do what I wanted. I have been done with this for a while, but I have not got around to publishing / documenting it until now.
Windows Exe: https://bitbucket.org/dcm684/gpxheat/downloads/GPXHeat.exe
What GPX Heat Does
The program is given a set of GPX files containing GPS tracks and will return a KML file that contains colored points. Each point’s color is based on the number of times a GPX track is close to that point. Colors range from blue (cold) to red (hot). The areas that are more red indicate where there has been more activity.
Output files can be opened in Google Earth or any other program that can out KML or KMZ files. In addition to coloring the point based on the number of times a point was near, each of the points in the KML file can be clicked to show those time and dates.
If you are like me, you probably have hundreds of GPX files and do not want to type in the file names for all of these files. This program can read all of the files in a given directory. For all of my rides I prepend “Ride” and “Run” for my runs. GPX Heat takes regular expressions in as arguments and can filter the input files and will only analyze the files that you want.
Sometimes I only want to analyze the points in a certain area. GPX Heat can exclude everywhere else. It can also hide areas within certain bounds. Both of these parameters can be given multiple sets of bounds.
Some points might be intersected considerably more frequently that other. One such point might be the one around your house. This means that color distribution might be skewed to the blue colors. GPX Heat allows the number of colors to be limited allowing a more even color distribution. The example here reduces the number of colors from 10 to 3.
Getting and Running GPX Heat
Both the GPX Heat Python source code and Windows executable are hosted on BitBucket. The Windows executable was created using Py2EXE. When using the EXE file use “GPXHeat.exe” in place of “GPXHeat.py.” The links are in the Download section above.
You can also drag and drop files on “GPXHeat.exe” and the program will create the map. This does not work with “GPXHeat.py.”
Analyze “file1.gpx” and “file2.gpx”:
GPXHeat.py file1.gpx file2.gpx
Analyze all files in the directory (-d) “MyFiles” and all of its subdirectories (-r)
GPXHeat.py -d MyFiles -r
Exclude files outside of the box bounded by corners at 10.5N 30.2W and 11.2N 31.3W (-e). The
GPXHeat.py -d MyFiles -r -e 10.5,-30.2,11.2,-31.3
Output KML files can be compacted into the KMZ format
GPXHeat.py -d MyFiles -z
Reduce the spacing between points to add detail (and file size) to the output to (-s 1)1m between points
GPXHeat.py -d MyFiles -r -s 1
Limit the number of color options to 3 colors (-c 3).
GPXHeat.py -d MyFiles -r -c 3
Other settings can be accessed through the help (-h) argument
Nice! Just wondering if it reads gpx version 1.1? 😉
My GPX files were all revision 1.1.