Skip to content

Instantly share code, notes, and snippets.

@hepplerj
Created May 10, 2017 14:44
Show Gist options
  • Save hepplerj/ca157dd14fe0b2051d5bd4679a1e57d2 to your computer and use it in GitHub Desktop.
Save hepplerj/ca157dd14fe0b2051d5bd4679a1e57d2 to your computer and use it in GitHub Desktop.
Bulk convert shapefiles to geojson
# Bulk convert shapefiles to geojson
function shp2geojson() {
ogr2ogr -f GeoJSON -t_srs crs:84 "$1.geojson" "$1.shp"
}
for var in *.shp; do shp2geojson ${var%\.*}; done
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment