optimize-gpx
optimize-gpx copied to clipboard
Optimize GPX track using Python by fixing altitude (SRTM), deleting bitten segments and reducing number of points using Ramer–Douglas–Peucker algorithm.
Optimize GPX file
Optimize GPX track by fixing altitude (SRTM), deleting bitten segments and reducing number of points using Ramer–Douglas–Peucker algorithm.
Install
pip install -r requirements.txt
Run
python optimize-gpx.py myfile.gpx
Overview
- Fix elevations using data from Shuttle Radar Topography Mission
- Split segments into two parts if the distance between two points exceeds the threshold (500m)
- Reduce number of points using Ramer–Douglas–Peucker algorithm
Examples
Fix elevations:
Delete segments with distance of 500m or more between points