changeset 6805:0b2c9de5e681 double-precision

Geo-importer: use commandline-argument instead of configuration for river selection.
author Tom Gottfried <tom.gottfried@intevation.de>
date Fri, 09 Aug 2013 17:57:12 +0200
parents 1e430c0ec285
children 54cf29667079
files backend/contrib/run_geo.sh
diffstat 1 files changed, 6 insertions(+), 4 deletions(-) [+]
line wrap: on
line diff
--- 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@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"`

http://dive4elements.wald.intevation.org