Stepping through the program
Now we're ready to work through the GPX-Reporter 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. The following list contains the major steps in the program:
- Setting up the Python logging module
- Establishing our helper functions
- Parsing the GPX data file
- Calculating the route bounding box
- Buffering the bounding box
- Converting the box to meters
- Downloading the base map
- Downloading the elevation data
- Hillshading the elevation data
- Increasing the hillshade contrast
- Blending the hillshade and base map
- Drawing the GPX track on a separate image
- Blending the track image and base map
- Drawing the start and finish points
- Saving the map image
- Calculating the route mile markers
- Building the elevation profile chart
- Getting the weather data for the route time period
- Generating the PDF report