Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
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