Created
May 10, 2017 14:44
-
-
Save hepplerj/ca157dd14fe0b2051d5bd4679a1e57d2 to your computer and use it in GitHub Desktop.
Bulk convert shapefiles to geojson
This file contains hidden or 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
# 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