Created
November 28, 2014 20:15
-
-
Save alexanno/8ccda40ba2a1e7b20503 to your computer and use it in GitHub Desktop.
This file contains 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
find ./ -name \*Elveg.SOS -execdir echo "ogr2ogr -update -append -f PostgreSQL PG:'host=localhost port=54321 dbname=sandbox user=postgres active_schema=sandbox' -progress -nln elveg {}" \; | |
find ./ -name \*Adresser.SOS -execdir ogr2ogr -update -append -f PostgreSQL PG:'host=localhost port=54321 dbname=sandbox user=postgres active_schema=sandbox' -progress -nln adresser {} \; | |
#################################################### | |
#using shp2pgsql | |
#!/bin/bash | |
for f in *.shp | |
do | |
shp2pgsql -I -s <SRID> $f `basename $f .shp` > `basename $f .shp`.sql | |
done | |
for f in *.sql | |
do | |
psql -d <DATABASE> -f $f | |
done |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment