ingo@3683: #!/bin/sh ingo@3683: aheinecke@4873: # Set this to your target database for Oracle ingo@3683: HOST=localhost tom@6658: BACKEND_NAME="XE" ingo@3683: USER=flys28 ingo@3683: PASS=flys28 aheinecke@4873: # Alternatively you can provide a direct connection string: aheinecke@4873: # OGR_CONNECTION="PG:dbname=flys host=localhost port=5432 user=flys password=flys" ingo@3683: ingo@3683: # Optional ingo@3683: VERBOSE=1 ingo@3683: SKIP_AXIS=0 ingo@3683: SKIP_KMS=0 ingo@3683: SKIP_CROSSSECTIONS=0 ingo@3683: SKIP_FIXPOINTS=0 ingo@3683: SKIP_BUILDINGS=0 ingo@3683: SKIP_FLOODPLAINS=0 ingo@3683: SKIP_HYDR_BOUNDARIES=0 aheinecke@4873: SKIP_HWS_LINES=0 aheinecke@4873: SKIP_HWS_POINTS=0 ingo@3683: SKIP_UESG=0 aheinecke@5035: SKIP_DGM=0 aheinecke@5353: SKIP_JETTIES=0 aheinecke@5545: SKIP_FLOODMARKS=0 ingo@3683: tom@6651: # Default encoding. Change here if necessary tom@6651: export LC_ALL=de_DE@euro tom@6651: aheinecke@5066: # There should be no need to change anything below this line tom@6805: GEW_FILE="$1" tom@6805: RIVER_NAME=$(grep "Gew.sser" "$1" | sed 's/Gew.sser: //') tom@6805: tom@6805: RIVER_PATH=$(grep "WSTDatei:" "$GEW_FILE" | awk '{print $2}') tom@6805: RIVER_PATH=$(dirname "$RIVER_PATH")/../.. tom@6805: RIVER_PATH=$(readlink -f "$RIVER_PATH") aheinecke@5066: ingo@3683: DIR=`dirname $0` ingo@3683: DIR=`readlink -f "$DIR"` ingo@3683: aheinecke@5074: OPTIONAL_LIBS="${DIR}"/opt aheinecke@5066: if [ -d "$OPTIONAL_LIBS" ]; then aheinecke@5066: export PATH="$OPTIONAL_LIBS/bin:$PATH" aheinecke@5066: export LD_LIBRARY_PATH="$OPTIONAL_LIBS/lib:$LD_LIBRARY_PATH" aheinecke@5066: export LD_LIBRARY_PATH="$OPTIONAL_LIBS/lib64:$LD_LIBRARY_PATH" aheinecke@5066: export PYTHONPATH="$OPTIONAL_LIBS/lib/python2.6/site-packages:$PYTHONPATH" aheinecke@5074: export PYTHONPATH="$OPTIONAL_LIBS/lib64/python2.6/site-packages:$PYTHONPATH" aheinecke@5074: export GDAL_DATA="$OPTIONAL_LIBS/share/gdal" aheinecke@5066: fi aheinecke@5066: ingo@3683: exec python $DIR/shpimporter/shpimporter.py \ ingo@3683: --directory $RIVER_PATH \ tom@5563: --river_name "$RIVER_NAME" \ aheinecke@4873: --ogr_connection "$OGR_CONNECTION" \ tom@6658: --host $HOST/$BACKEND_NAME \ ingo@3683: --user $USER \ ingo@3683: --password $PASS \ ingo@3683: --verbose $VERBOSE \ ingo@3683: --skip_axis $SKIP_AXIS \ ingo@3683: --skip_kms $SKIP_KMS \ ingo@3683: --skip_crosssections $SKIP_CROSSSECTIONS \ ingo@3683: --skip_fixpoints $SKIP_FIXPOINTS \ ingo@3683: --skip_buildings $SKIP_BUILDINGS \ ingo@3683: --skip_floodplains $SKIP_FLOODPLAINS \ ingo@3683: --skip_hydr_boundaries $SKIP_HYDR_BOUNDARIES \ aheinecke@4873: --skip_uesgs $SKIP_UESG \ aheinecke@4873: --skip_hws_lines $SKIP_HWS_LINES \ aheinecke@5035: --skip_hws_points $SKIP_HWS_POINTS \ aheinecke@5353: --skip_dgm $SKIP_DGM \ aheinecke@5545: --skip_jetties $SKIP_JETTIES \ aheinecke@5545: --skip_floodmarks $SKIP_FLOODMARKS