[PATCH] Import for S-INFO/U-INFO added (new skip parameters)

Wald Commits scm-commit at wald.intevation.org
Wed Apr 18 09:48:05 CEST 2018


# HG changeset patch
# User mschaefer
# Date 1524037638 -7200
# Node ID 1fec0a06d8335c109719215d6c95baaa4d445592
# Parent  abe069eb180ce0a3d97d936fd908572a2c43eaac
Import for S-INFO/U-INFO added (new skip parameters)

diff -r abe069eb180c -r 1fec0a06d833 backend/contrib/import_river.sh
--- a/backend/contrib/import_river.sh	Wed Apr 18 07:43:55 2018 +0200
+++ b/backend/contrib/import_river.sh	Wed Apr 18 09:47:18 2018 +0200
@@ -63,12 +63,13 @@
    --skip-morpho                   Skip import of morphological data
    --skip-geo                      Skip import of geographic data
    --skip-prf                      Skip import of cross section data
+   --skip-sinfo_uinfo              Skip import of S-INFO and U-INFO data
 EOF
 exit 0
 }
 
 OPTS=`getopt -o ?u:w:h:p:d:l: \
-     -l help,username:,password:,host:,port:,db-name:,log-dir:,skip-hydro,skip-morpho,skip-geo,skip-prf,postgres \
+     -l help,username:,password:,host:,port:,db-name:,log-dir:,skip-hydro,skip-morpho,skip-geo,skip-prf,skip-sinfo_uinfo,postgres \
      -n $0 -- "$@"`
 if [ $? != 0 ] ; then usage; fi
 eval set -- "$OPTS"
@@ -109,6 +110,9 @@
     "--skip-geo")
       SKIP_GEO="TRUE"
       shift;;
+    "--skip-sinfo_uinfo")
+      SKIP_SINFO_UINFO="TRUE"
+      shift;;
     "--postgres")
       POSTGRES="TRUE"
       shift;;
@@ -228,6 +232,17 @@
     -Dflys.backend.importer.skip.porosity=true \
     -Dflys.backend.importer.skip.flow.velocity=true \
     -Dflys.backend.importer.skip.bed.height=true \
+    -Dflys.backend.importer.skip.sinfo.bed_mobility=true \
+    -Dflys.backend.importer.skip.sinfo.selected_additional=true \
+    -Dflys.backend.importer.skip.sinfo.infrastructure=true \
+    -Dflys.backend.importer.skip.sinfo.channel=true \
+    -Dflys.backend.importer.skip.sinfo.collision=true \
+    -Dflys.backend.importer.skip.sinfo.daily_discharge=true \
+    -Dflys.backend.importer.skip.sinfo.tkh=true \
+    -Dflys.backend.importer.skip.sinfo.flow_depth=true \
+    -Dflys.backend.importer.skip.sinfo.depth_evolution=true \
+    -Dflys.backend.importer.skip.uinfo.salix=true \
+    -Dflys.backend.importer.skip.uinfo.vegetation=true \
     $JAR
 }
 
@@ -277,6 +292,17 @@
     -Dflys.backend.importer.skip.porosity=false \
     -Dflys.backend.importer.skip.flow.velocity=false \
     -Dflys.backend.importer.skip.bed.height=false \
+    -Dflys.backend.importer.skip.sinfo.bed_mobility=true \
+    -Dflys.backend.importer.skip.sinfo.selected_additional=true \
+    -Dflys.backend.importer.skip.sinfo.infrastructure=true \
+    -Dflys.backend.importer.skip.sinfo.channel=true \
+    -Dflys.backend.importer.skip.sinfo.collision=true \
+    -Dflys.backend.importer.skip.sinfo.daily_discharge=true \
+    -Dflys.backend.importer.skip.sinfo.tkh=true \
+    -Dflys.backend.importer.skip.sinfo.flow_depth=true \
+    -Dflys.backend.importer.skip.sinfo.depth_evolution=true \
+    -Dflys.backend.importer.skip.uinfo.salix=true \
+    -Dflys.backend.importer.skip.uinfo.vegetation=true \
     $JAR
 }
 
@@ -326,6 +352,17 @@
     -Dflys.backend.importer.skip.porosity=true \
     -Dflys.backend.importer.skip.flow.velocity=true \
     -Dflys.backend.importer.skip.bed.height=true \
+    -Dflys.backend.importer.skip.sinfo.bed_mobility=true \
+    -Dflys.backend.importer.skip.sinfo.selected_additional=true \
+    -Dflys.backend.importer.skip.sinfo.infrastructure=true \
+    -Dflys.backend.importer.skip.sinfo.channel=true \
+    -Dflys.backend.importer.skip.sinfo.collision=true \
+    -Dflys.backend.importer.skip.sinfo.daily_discharge=true \
+    -Dflys.backend.importer.skip.sinfo.tkh=true \
+    -Dflys.backend.importer.skip.sinfo.flow_depth=true \
+    -Dflys.backend.importer.skip.sinfo.depth_evolution=true \
+    -Dflys.backend.importer.skip.uinfo.salix=true \
+    -Dflys.backend.importer.skip.uinfo.vegetation=true \
     $JAR
 }
 
@@ -349,6 +386,66 @@
     > "$LOG_FILE" 2>&1
 }
 
+import_sinfo_uinfo(){
+    LOG_FILE=${LOG_DIR}/sinfo-uinfo.log
+    echo Importing S-INFO and U-INFO data.
+    echo Logging into: $LOG_FILE
+    sed -i 's!\(log4j.appender.IMPORTER.File=\).*!\1'"$LOG_FILE"'!' \
+        $LOG_DIR/log4j.properties
+    java -jar \
+    -Xmx$MIN_MEMORY \
+    -server \
+    -Dlog4j.configuration=file://$LOG_DIR/log4j.properties \
+    -Dflys.backend.user=$DBUSER \
+    -Dflys.backend.password=$DBPASS \
+    -Dflys.backend.url=$BACKEND_URL \
+    -Dflys.backend.driver=$BACKEND_DB_DRIVER \
+    -Dflys.backend.dialect=$BACKEND_DB_DIALECT \
+    -Dflys.backend.importer.infogew.file="$GEW_FILE" \
+    -Dflys.backend.main.value.types=$IMPORTER_MAINVALUE_TYPES \
+    -Dflys.backend.importer.annotation.types=$IMPORTER_ANNOTATION_TYPES \
+    -Dflys.backend.importer.dry.run=$IMPORTER_DRY_RUN \
+    -Dflys.backend.importer.skip.annotations=true \
+    -Dflys.backend.importer.skip.bwastr=true \
+    -Dflys.backend.importer.skip.extra.wsts=true \
+    -Dflys.backend.importer.skip.fixations=true \
+    -Dflys.backend.importer.skip.flood.water=true \
+    -Dflys.backend.importer.skip.flood.protection=true \
+    -Dflys.backend.importer.skip.gauges=true \
+    -Dflys.backend.importer.skip.historical.discharge.tables=true \
+    -Dflys.backend.importer.skip.hyks=true \
+    -Dflys.backend.importer.skip.official.lines=true \
+    -Dflys.backend.importer.skip.prfs=true \
+    -Dflys.backend.importer.skip.w80s=true \
+    -Dflys.backend.importer.skip.w80.csvs=true \
+    -Dflys.backend.importer.skip.da50s=true \
+    -Dflys.backend.importer.skip.da66s=true \
+    -Dflys.backend.importer.skip.wst=true \
+    -Dflys.backend.importer.skip.measurement.stations=true \
+    -Dflys.backend.importer.skip.waterlevel.differences=true \
+    -Dflys.backend.importer.skip.waterlevels=true \
+    -Dflys.backend.importer.skip.sq.relation=true \
+    -Dflys.backend.importer.skip.sediment.density=true \
+    -Dflys.backend.importer.skip.sediment.load=true \
+    -Dflys.backend.importer.skip.sediment.load.ls=true \
+    -Dflys.backend.importer.skip.morphological.width=true \
+    -Dflys.backend.importer.skip.porosity=true \
+    -Dflys.backend.importer.skip.flow.velocity=true \
+    -Dflys.backend.importer.skip.bed.height=true \
+    -Dflys.backend.importer.skip.sinfo.bed_mobility=false \
+    -Dflys.backend.importer.skip.sinfo.selected_additional=false \
+    -Dflys.backend.importer.skip.sinfo.infrastructure=false \
+    -Dflys.backend.importer.skip.sinfo.channel=false \
+    -Dflys.backend.importer.skip.sinfo.collision=false \
+    -Dflys.backend.importer.skip.sinfo.daily_discharge=false \
+    -Dflys.backend.importer.skip.sinfo.tkh=false \
+    -Dflys.backend.importer.skip.sinfo.flow_depth=false \
+    -Dflys.backend.importer.skip.sinfo.depth_evolution=false \
+    -Dflys.backend.importer.skip.uinfo.salix=false \
+    -Dflys.backend.importer.skip.uinfo.vegetation=false \
+    $JAR
+}
+
 
 if [ "$SKIP_HYDRO" != "TRUE" ]; then
 import_hydro
@@ -362,3 +459,6 @@
 if [ "$SKIP_GEO" != "TRUE" ]; then
 import_geo
 fi
+if [ "$SKIP_SINFO_UINFO" != "TRUE" ]; then
+import_sinfo_uinfo
+fi
diff -r abe069eb180c -r 1fec0a06d833 backend/contrib/run_hydr_morph.sh
--- a/backend/contrib/run_hydr_morph.sh	Wed Apr 18 07:43:55 2018 +0200
+++ b/backend/contrib/run_hydr_morph.sh	Wed Apr 18 09:47:18 2018 +0200
@@ -52,6 +52,19 @@
 IMPORTER_SKIP_SQ_RELATION=false
 IMPORTER_SKIP_WATERLEVELS=false
 IMPORTER_SKIP_WATERLEVEL_DIFFERENCES=false
+
+IMPORTER_SKIP_SINFO_BED_MOBILITY=false
+IMPORTER_SKIP_SINFO_SELECTED_ADDITIONAL=false
+IMPORTER_SKIP_SINFO_INFRASTRUCTURE=false
+IMPORTER_SKIP_SINFO_CHANNEL=false
+IMPORTER_SKIP_SINFO_COLLISION=false
+IMPORTER_SKIP_SINFO_DAILY_DISCHARGE=false
+IMPORTER_SKIP_SINFO_TKH=false
+IMPORTER_SKIP_SINFO_FLOW_DEPTH=false
+IMPORTER_SKIP_SINFO_DEPTH_EVOLUTION=false
+IMPORTER_SKIP_UINFO_SALIX=false
+IMPORTER_SKIP_UINFO_VEGETATION=false
+
 #####################################################################
 
 MIN_MEMORY="8192m"
@@ -104,6 +117,17 @@
     -Dflys.backend.importer.skip.waterlevels=$IMPORTER_SKIP_WATERLEVELS \
     -Dflys.backend.importer.skip.waterlevel.differences=$IMPORTER_SKIP_WATERLEVEL_DIFFERENCES \
     -Dflys.backend.importer.skip.wst=$IMPORTER_SKIP_WST \
+    -Dflys.backend.importer.skip.sinfo.bed_mobility=$IMPORTER_SKIP_SINFO_BED_MOBILITY \
+    -Dflys.backend.importer.skip.sinfo.selected_additional=$IMPORTER_SKIP_SINFO_SELECTED_ADDITIONAL \
+    -Dflys.backend.importer.skip.sinfo.infrastructure=$IMPORTER_SKIP_SINFO_INFRASTRUCTURE \
+    -Dflys.backend.importer.skip.sinfo.channel=$IMPORTER_SKIP_SINFO_CHANNEL \
+    -Dflys.backend.importer.skip.sinfo.collision=$IMPORTER_SKIP_SINFO_COLLISION \
+    -Dflys.backend.importer.skip.sinfo.daily_discharge=$IMPORTER_SKIP_SINFO_DAILY_DISCHARGE \
+    -Dflys.backend.importer.skip.sinfo.tkh=$IMPORTER_SKIP_SINFO_TKH \
+    -Dflys.backend.importer.skip.sinfo.flow_depth=$IMPORTER_SKIP_SINFO_FLOW_DEPTH \
+    -Dflys.backend.importer.skip.sinfo.depth_evolution=$IMPORTER_SKIP_SINFO_DEPTH_EVOLUTION \
+    -Dflys.backend.importer.skip.uinfo.salix=$IMPORTER_SKIP_UINFO_SALIX \
+    -Dflys.backend.importer.skip.uinfo.vegetation=$IMPORTER_SKIP_UINFO_VEGETATION \
     -Dflys.backend.user=$BACKEND_USER \
     -Dflys.backend.password=$BACKEND_PASS \
     -Dflys.backend.url=$BACKEND_URL \


More information about the Dive4Elements-commits mailing list