comparison flys-backend/contrib/import_river.sh @ 5169:db1a000a21a9

Make OPTIONAL_LIBS overwritable and fix geo importer call
author Andre Heinecke <aheinecke@intevation.de>
date Mon, 04 Mar 2013 17:08:14 +0100
parents 650f94ec3122
children b3a15fa3d88e
comparison
equal deleted inserted replaced
5168:650f94ec3122 5169:db1a000a21a9
36 IMPORTER_ANNOTATION_TYPES="conf/annotation-types.xml" 36 IMPORTER_ANNOTATION_TYPES="conf/annotation-types.xml"
37 37
38 38
39 MIN_MEMORY="8024m" 39 MIN_MEMORY="8024m"
40 40
41 OPTIONAL_LIBS="${DIR}"/../opt 41 if [ -z "$OPTIONAL_LIBS" ]; then
42 OPTIONAL_LIBS="${DIR}"/../opt
43 fi
44
42 if [ -d "$OPTIONAL_LIBS" ]; then 45 if [ -d "$OPTIONAL_LIBS" ]; then
43 export PATH="$OPTIONAL_LIBS/bin:$PATH" 46 export PATH="$OPTIONAL_LIBS/bin:$PATH"
44 export LD_LIBRARY_PATH="$OPTIONAL_LIBS/lib:$LD_LIBRARY_PATH" 47 export LD_LIBRARY_PATH="$OPTIONAL_LIBS/lib:$LD_LIBRARY_PATH"
45 export LD_LIBRARY_PATH="$OPTIONAL_LIBS/lib64:$LD_LIBRARY_PATH" 48 export LD_LIBRARY_PATH="$OPTIONAL_LIBS/lib64:$LD_LIBRARY_PATH"
46 export PYTHONPATH="$OPTIONAL_LIBS/lib/python2.6/site-packages:$PYTHONPATH" 49 export PYTHONPATH="$OPTIONAL_LIBS/lib/python2.6/site-packages:$PYTHONPATH"
317 import_geo(){ 320 import_geo(){
318 LOG_FILE=${LOG_DIR}/geo.log 321 LOG_FILE=${LOG_DIR}/geo.log
319 echo Importing Geographic data. 322 echo Importing Geographic data.
320 echo Logging into: $LOG_FILE 323 echo Logging into: $LOG_FILE
321 324
322 python $DIR/geodaesie/shpimporter.py \ 325 RIVER_PATH=$(grep "WSTDatei:" "$GEW_FILE" | awk '{print $2}')
326 RIVER_PATH=$(dirname "$RIVER_PATH")/../..
327 RIVER_PATH=$(readlink -f "$RIVER_PATH")
328
329 exec python $(dirname $0)/geodaesie/shpimporter.py \
323 --directory $RIVER_PATH \ 330 --directory $RIVER_PATH \
324 --river_name $RIVER_NAME \ 331 --river_name $RIVER_NAME \
325 --ogr_connection "$OGR_CONNECTION" \ 332 --ogr_connection "$OGR_CONNECTION" \
326 --host $HOST \ 333 --host $HOST \
327 --user $USER \ 334 --user $USER \
328 --password $PASS \ 335 --password $PASS \
329 --verbose 2 2>&1 > "$LOG_FILE" 336 --verbose 1 \
337 > "$LOG_FILE" 2>&1
330 } 338 }
331 339
332 340
333 if [ "$SKIP_HYDRO" != "TRUE" ]; then 341 if [ "$SKIP_HYDRO" != "TRUE" ]; then
334 import_hydro 342 import_hydro

http://dive4elements.wald.intevation.org