[PATCH 08 of 17] Geo-importer: use commandline-argument instead of configuration for river selection

Wald Commits scm-commit at wald.intevation.org
Sat Aug 10 12:30:13 CEST 2013


# HG changeset patch
# User Tom Gottfried <tom.gottfried at intevation.de>
# Date 1376063832 -7200
# Branch double-precision
# Node ID 0b2c9de5e6816ec8397759ad0bac17a776ea85b4
# Parent  1e430c0ec28598afe6d4a7b4bb1dda11070f8dd8
Geo-importer: use commandline-argument instead of configuration for river selection.

diff -r 1e430c0ec285 -r 0b2c9de5e681 backend/contrib/run_geo.sh
--- a/backend/contrib/run_geo.sh	Fri Aug 09 17:27:16 2013 +0200
+++ b/backend/contrib/run_geo.sh	Fri Aug 09 17:57:12 2013 +0200
@@ -1,9 +1,5 @@
 #!/bin/sh
 
-# Required
-RIVER_PATH="/vol1/projects/Geospatial/flys-3.0/testdaten/Gewaesser/Saar"
-RIVER_NAME="Saar"
-
 # Set this to your target database for Oracle
 HOST=localhost
 BACKEND_NAME="XE"
@@ -34,6 +30,12 @@
 export LC_ALL=de_DE at euro
 
 # There should be no need to change anything below this line
+GEW_FILE="$1"
+RIVER_NAME=$(grep "Gew.sser" "$1" | sed 's/Gew.sser: //')
+
+RIVER_PATH=$(grep "WSTDatei:" "$GEW_FILE" | awk '{print $2}')
+RIVER_PATH=$(dirname "$RIVER_PATH")/../..
+RIVER_PATH=$(readlink -f "$RIVER_PATH")
 
 DIR=`dirname $0`
 DIR=`readlink -f "$DIR"`


More information about the Dive4elements-commits mailing list