Skip to content

Instantly share code, notes, and snippets.

@marcellobenigno
Created October 12, 2012 22:43
Show Gist options
  • Save marcellobenigno/3882066 to your computer and use it in GitHub Desktop.
Save marcellobenigno/3882066 to your computer and use it in GitHub Desktop.
Load multiple shapefiles into PostGIS
#!/bin/bash
#change the SRID if necessary
for f in *.shp
do
shp2pgsql -s 29185 $f `basename $f .shp` > `basename $f .shp`.sql
done
#Source: http://gis.stackexchange.com/questions/7803/bulk-load-multiple-shapefiles-into-postgis
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment