Commit b2b98f55 authored by Alice Salsé's avatar Alice Salsé
Browse files

👌 corrections

parent f7c6173d
......@@ -22,4 +22,4 @@ do
done
echo Grant roles
psql -h ${host} -d ${dbname} -U ${user} -p ${port} -b -q -v schemaname=${schemaname} -f sql/grant_tables_roles.sql
rm $fichier sql/-vl_copy_tmp.sql
rm sql/-vl_copy_tmp.sql
......@@ -4,13 +4,13 @@
. ../database.ini
export PGPASSWORD=${password}
path="..."
schemaname=inte_datasup
schemaname=inte_shp
echo Creation du schema $schemaname et import des shp dans la base ${dbname} sur ${host} ${port}
# unzip ${path}/shp.zip -d ${path}/inte
psql -h ${host} -d ${dbname} -U ${user} -p ${port} -b -q -c "DROP SCHEMA IF EXISTS $schemaname CASCADE; CREATE SCHEMA $schemaname;"
for shp in "${path}"/*.shp #"${path}"/vl_*.dbf
do
ogr2ogr -gt 65536 -f PostgreSQL PG:"dbname=${dbname} host=${host} port=${port} user=${user} password=${password} active_schema=$schemaname" "$shp" -t_srs 'EPSG:2154' -nlt PROMOTE_TO_MULTI -skipfailures # -oo ENCODING=CP1252
ogr2ogr -gt 65536 -f PostgreSQL PG:"dbname=${dbname} host=${host} port=${port} user=${user} password=${password} active_schema=$schemaname" "$shp" -t_srs 'EPSG:2154' -lco GEOMETRY_NAME=geom -skipfailures #-nlt PROMOTE_TO_MULTI # -oo ENCODING=CP1252
done
# rm -r -f ${path}/inte
echo Import des données terminé
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment