Skip to content

Instantly share code, notes, and snippets.

@heyitsgarrett
Created August 16, 2021 20:56
Show Gist options
  • Save heyitsgarrett/53ab39e3ecfffa15fc767d20a9e85f0e to your computer and use it in GitHub Desktop.
Save heyitsgarrett/53ab39e3ecfffa15fc767d20a9e85f0e to your computer and use it in GitHub Desktop.
Convert a set of GPX files to a single GeoJSON
# Convert a set of GPX files to a single GeoJSON, using:
# - https://github.com/mapbox/togeojson
# - https://github.com/mapbox/geojson-merge
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