diff db_schema/setup-db.sh @ 1056:299f4ba86090

extend docker envireoment to load geographical data of german comunities
author Michael Stanko <mstanko@bfs.de>
date Wed, 28 Sep 2016 09:06:18 +0200
parents bc44dcda6f69
children 4ce4bd48c260
line wrap: on
line diff
--- a/db_schema/setup-db.sh	Wed Sep 28 08:48:04 2016 +0200
+++ b/db_schema/setup-db.sh	Wed Sep 28 09:06:18 2016 +0200
@@ -77,4 +77,16 @@
 
     echo import lada test data
     psql $DB_CONNECT_STRING -d $DB_NAME -f $DIR/lada_data.sql
+
+    echo create user $ROLE_NAME
+    psql $DB_CONNECT_STRING -d $DB_NAME --command "CREATE SCHEMA geo AUTHORIZATION $ROLE_NAME"
+
+    TS="0101" 
+    cd /tmp
+    curl -O http://sg.geodatenzentrum.de/web_download/vg/vg250_${TS}/utm32s/shape/vg250_${TS}.utm32s.shape.ebenen.zip && \
+    unzip vg250_${TS}.utm32s.shape.ebenen.zip "*VG250_GEM*"
+    cd vg250_${TS}.utm32s.shape.ebenen/vg250_ebenen/
+    shp2pgsql VG250_GEM geo.gem_utm | psql $DB_CONNECT_STRING -d $DB_NAME
+    cd /tmp
+    rm -rf vg250_${TS}.utm32s.shape.ebenen*
 fi
This site is hosted by Intevation GmbH (Datenschutzerklärung und Impressum | Privacy Policy and Imprint)