changeset 3683:4298ef9bd4a6

Added run scripts for both importers. flys-backend/trunk@5315 c6561f87-3c4e-4783-a992-168aeb5c3f6f
author Ingo Weinzierl <ingo.weinzierl@intevation.de>
date Thu, 30 Aug 2012 11:06:12 +0000
parents 16498764fca5
children 3b001c273f1b
files flys-backend/ChangeLog flys-backend/contrib/run_geo.sh flys-backend/contrib/run_hydr_morph.sh
diffstat 3 files changed, 160 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- a/flys-backend/ChangeLog	Thu Aug 30 10:26:03 2012 +0000
+++ b/flys-backend/ChangeLog	Thu Aug 30 11:06:12 2012 +0000
@@ -1,3 +1,10 @@
+2012-08-30  Ingo Weinzierl <ingo@intevation.de>
+
+	* contrib/run_geo.sh: New run script for the python based geo importer.
+
+	* contrib/run_hydr_morph.sh: New run script for the java based importer
+	  for hydrological and morphological data.
+
 2012-08-30  Ingo Weinzierl <ingo@intevation.de>
 
 	* doc/documentation/de/overview.tex: Fixed typo.
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/flys-backend/contrib/run_geo.sh	Thu Aug 30 11:06:12 2012 +0000
@@ -0,0 +1,50 @@
+#!/bin/sh
+
+# Required
+RIVER_PATH="/vol1/projects/Geospatial/flys-3.0/testdaten/Gewaesser/Saar"
+RIVER_ID=1
+TARGET_SRS=31467
+HOST=localhost
+USER=flys28
+PASS=flys28
+
+# Optional
+VERBOSE=1
+SKIP_AXIS=0
+SKIP_KMS=0
+SKIP_CROSSSECTIONS=0
+SKIP_LINES=0
+SKIP_FIXPOINTS=0
+SKIP_BUILDINGS=0
+SKIP_FLOODPLAINS=0
+SKIP_HYDR_BOUNDARIES=0
+SKIP_HWS=0
+SKIP_GAUGE_LOCATION=0
+SKIP_CATCHMENTS=0
+SKIP_UESG=0
+
+
+DIR=`dirname $0`
+DIR=`readlink -f "$DIR"`
+
+exec python $DIR/shpimporter/shpimporter.py \
+    --directory $RIVER_PATH \
+    --river_id $RIVER_ID \
+    --target_srs $TARGET_SRS \
+    --host $HOST \
+    --user $USER \
+    --password $PASS \
+    --verbose $VERBOSE \
+    --skip_axis $SKIP_AXIS \
+    --skip_kms $SKIP_KMS \
+    --skip_crosssections $SKIP_CROSSSECTIONS \
+    --skip_lines $SKIP_LINES \
+    --skip_fixpoints $SKIP_FIXPOINTS \
+    --skip_buildings $SKIP_BUILDINGS \
+    --skip_floodplains $SKIP_FLOODPLAINS \
+    --skip_hydr_boundaries $SKIP_HYDR_BOUNDARIES \
+    --skip_hws $SKIP_HWS \
+    --skip_gauge_locations $SKIP_GAUGE_LOCATION \
+    --skip_catchments $SKIP_CATCHMENTS \
+    --skip_uesgs $SKIP_UESG
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/flys-backend/contrib/run_hydr_morph.sh	Thu Aug 30 11:06:12 2012 +0000
@@ -0,0 +1,103 @@
+#!/bin/bash
+
+######################### CONFIG OPTIONS ############################
+INFO_GEW="/vol1/projects/Geospatial/flys-3.0/testdaten/saar.gew"
+BACKEND_USER="flys28"
+BACKEND_PASS="flys28"
+BACKEND_HOST="czech-republic.atlas.intevation.de"
+BACKEND_PORT="1521"
+BACKEND_NAME="XE"
+LOG4J_CONFIG="conf/log4j.properties"
+#####################################################################
+
+
+########################## Oracle Settings ##########################
+BACKEND_DB_PREFIX="jdbc:oracle:thin:@"
+BACKEND_DB_DRIVER="oracle.jdbc.OracleDriver"
+BACKEND_DB_DIALECT="org.hibernate.dialect.OracleDialect"
+BACKEND_URL=$BACKEND_DB_PREFIX//$BACKEND_HOST:$BACKEND_PORT/$BACKEND_NAME
+#####################################################################
+
+
+######################## Custom Importer Settings ###################
+IMPORTER_DRY_RUN=false
+IMPORTER_MAINVALUE_TYPES=QWTD
+IMPORTER_ANNOTATION_TYPES="conf/annotation-types.xml"
+
+IMPORTER_SKIP_GAUGES=false
+IMPORTER_SKIP_ANNOTATIONS=false
+IMPORTER_SKIP_WST=false
+IMPORTER_SKIP_PRFS=false
+IMPORTER_SKIP_HYKS=false
+IMPORTER_SKIP_EXTRA_WST=false
+IMPORTER_SKIP_FIXATIONS=false
+IMPORTER_SKIP_OFFICIAL_LINES=false
+IMPORTER_SKIP_FLOOD_WATER=false
+IMPORTER_SKIP_FLOOD_PROTECTION=false
+
+IMPORTER_SKIP_BED_HEIGHT_SINGLE=false
+IMPORTER_SKIP_BED_HEIGHT_EPOCH=false
+IMPORTER_SKIP_SEDIMENT_DENSITY=false
+IMPORTER_SKIP_MORPHOLOGICAL_WIDTH=false
+IMPORTER_SKIP_FLOW_VELOCITY=false
+IMPORTER_SKIP_SEDIMENT_YIELD=false
+IMPORTER_SKIP_WATERLEVELS=false
+IMPORTER_SKIP_WATERLEVEL_DIFFERENCES=false
+IMPORTER_SKIP_SQ_RELATION=false
+#####################################################################
+
+#MIN_MEMORY="8192m"
+MIN_MEMORY="1024m"
+
+
+########################## Importer Settings ########################
+APP="de.intevation.flys.importer.Importer"
+DIR=`dirname $0`
+DIR=`readlink -f "$DIR/.."`
+#####################################################################
+
+
+########################## Collect required libraries ###############
+CLASSPATH=
+for l in `find "$DIR/lib" -name \*.jar -print`; do
+   CLASSPATH=$CLASSPATH:$l
+done
+
+export CLASSPATH
+#####################################################################
+
+
+######################### Run Importer ##############################
+exec java \
+    -Xmx$MIN_MEMORY \
+    -server \
+    -Dlog4j.configuration=file://`readlink -f $LOG4J_CONFIG` \
+    -Dflys.backend.importer.infogew.file=$INFO_GEW \
+    -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.gauges=$IMPORTER_SKIP_GAUGES \
+    -Dflys.backend.importer.skip.annotations=$IMPORTER_SKIP_ANNOTATIONS \
+    -Dflys.backend.importer.skip.prfs=$IMPORTER_SKIP_PRFS \
+    -Dflys.backend.importer.skip.hyks=$IMPORTER_SKIP_HYKS \
+    -Dflys.backend.importer.skip.wst=$IMPORTER_SKIP_WST \
+    -Dflys.backend.importer.skip.extra.wsts=$IMPORTER_SKIP_EXTRA_WST \
+    -Dflys.backend.importer.skip.fixations=$IMPORTER_SKIP_FIXATIONS \
+    -Dflys.backend.importer.skip.official.lines=$IMPORTER_SKIP_OFFICIAL_LINES \
+    -Dflys.backend.importer.skip.flood.water=$IMPORTER_SKIP_FLOOD_WATER \
+    -Dflys.backend.importer.skip.flood.protection=$IMPORTER_SKIP_FLOOD_PROTECTION \
+    -Dflys.backend.importer.skip.bed.height.single=$IMPORTER_SKIP_BED_HEIGHT_SINGLE \
+    -Dflys.backend.importer.skip.bed.height.epoch=$IMPORTER_SKIP_BED_HEIGHT_EPOCH \
+    -Dflys.backend.importer.skip.sediment.density=$IMPORTER_SKIP_SEDIMENT_DENSITY \
+    -Dflys.backend.importer.skip.morphological.width=$IMPORTER_SKIP_MORPHOLOGICAL_WIDTH \
+    -Dflys.backend.importer.skip.flow.velocity=$IMPORTER_SKIP_FLOW_VELOCITY \
+    -Dflys.backend.importer.skip.sediment.yield=$IMPORTER_SKIP_SEDIMENT_YIELD \
+    -Dflys.backend.importer.skip.waterlevels=$IMPORTER_SKIP_WATERLEVELS \
+    -Dflys.backend.importer.skip.waterlevel.differences=$IMPORTER_SKIP_WATERLEVEL_DIFFERENCES \
+    -Dflys.backend.importer.skip.sq.relation=$IMPORTER_SKIP_SQ_RELATION \
+    -Dflys.backend.user=$BACKEND_USER \
+    -Dflys.backend.password=$BACKEND_PASS \
+    -Dflys.backend.url=$BACKEND_URL \
+    -Dflys.backend.driver=$BACKEND_DB_DRIVER \
+    -Dflys.backend.dialect=$BACKEND_DB_DIALECT \
+     $APP

http://dive4elements.wald.intevation.org