This script generates a minimalist map image from a GPX file containing route data of a cycling or running track.
-
Make sure you have Python installed on your system.
-
Install the required dependencies using pip3:
pip3 install -r requirements.txt
-
Run the script
gpx-map-drawer.py
:python3 gpx-map-drawer.py
-
Follow the prompts to enter the full path to the GPX file you want to use.
-
The script will generate a PNG map image based on the GPX data, with the same filename as the input GPX file.
You can customize the appearance of the map by modifying the following values directly in the gpx-map-drawer.py
script:
-
Line Width: Modify the
linewidth
parameter in theplot_route
function to adjust the thickness of the route line. -
Line Color: Modify the
color
parameter in theplt.plot
function to change the color of the route line. You can use hexadecimal color codes or named colors. -
Background Color: Modify the
set_facecolor
function to change the background color of the map. You can use hexadecimal color codes or named colors.
- gpxpy: Python library for parsing GPX files.
- matplotlib: Python library for creating static, animated, and interactive visualizations in Python.
The dependencies for this project are listed in the requirements.txt
file. You can install them using pip:
pip3 install -r requirements.txt
This project is licensed under the MIT License - see the LICENSE file for details.