Skip to content

Instantly share code, notes, and snippets.

@heyitsgarrett
Created August 16, 2021 20:56
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • 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