Skip to content

Instantly share code, notes, and snippets.

@pigreco
Last active June 13, 2017 07:34
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
Star You must be signed in to star a gist
Save pigreco/9ef7a2391715b17d98b7b20936251dab to your computer and use it in GitHub Desktop.
#!/bin/bash
# attivo il debug così vedo cosa avviene nella shell
set -x
# per ogni file shp contenuto nella cartella dello script, esegue
# l'import nel file spatialite denominato out.sqlite
for i in *.shp;
do ogr2ogr -append -f SQLite -dsco SPATIALITE=YES out.sqlite ./"$i";
done
@pigreco
Copy link
Author

pigreco commented Jun 13, 2017

questo script aggiunge, in un database spatialite (esistente o no) , tutti gli *.shp presenti nella cartella dello script.
è possibile avviare lo script dal terminale MSYS installato di default quando si installa QGIS!!!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment