Building a GPS reporting tool
The name of our program is GPX-Reporter.py
. If you recall from the Tag-based and markup-based formats section in Chapter 2, Learning about Geospatial Data, the GPX format is the most common way to store GPS route information. Nearly every program and device relying on GPS data can convert to and from GPX.
For this example, you can download a sample GPX file and a photo directory as a ZIP file from https://github.com/PacktPublishing/Learning-Geospatial-Analysis-with-Python-Fourth-Edition/raw/main/B19730_11_Asset_Files/GPX-Reporter.zip.
Unzip the route.gpx
file in the same directory as the GPX-Reporter.py
script you will create. The photos
directory, which only has one photo, should be at the same level as well.
Now, we’re ready to work through the GPX-Reporter.py
program. Like other scripts in this book, this program tries to minimize functions so that you can mentally trace the program better and modify it with less effort.