Last active
June 5, 2020 14:53
-
-
Save mkj-is/3eab8978cae13773701d93982b827bfd to your computer and use it in GitHub Desktop.
Combine GPX files to one GeoJSON
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
# Decompress all files (only some are compressed, primarily the newer ones) | |
for filename in *.gz | |
do | |
gzip -d $filename | |
done | |
# Convert all from GPX to GeoJSON | |
for filename in *.gpx | |
do | |
togeojson $filename > geojsons/$filename.geojson | |
done | |
# Merge the files into one in the end | |
geojson-merge geojsons/*.geojson > combined.geojson |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Made to convert Strava archive to MapBox tileset.
Used CLI tools: