Skip to content

Instantly share code, notes, and snippets.

@alexanno
Last active August 29, 2015 14:21
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save alexanno/da71257ac3822b09c823 to your computer and use it in GitHub Desktop.
Save alexanno/da71257ac3822b09c823 to your computer and use it in GitHub Desktop.
Unzip and load multiple SOSI files to one Postgis-table with ogr2ogr
#unzip all zip files
unzip '*.zip'
find ./ -name \*Stedsnavn*.sos -execdir ogr2ogr --config PG_USE_COPY YES --config PG_USE_BASE64 YES -update -append -f PostgreSQL PG:'host=localhost port=5432 dbname=alexanno user=alexanno active_schema=sandbox' -progress -nlt PROMOTE_TO_MULTI -nln stedsnavn_norge {} \;
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment