annotate backend/contrib/run_geo.sh @ 9615:ca492336570b

Merge
author mschaefer
date Wed, 09 Oct 2019 19:17:46 +0200
parents 4dc047fb3633
children
rev   line source
9030
4dc047fb3633 adding removed files
gernotbelger
parents:
diff changeset
1 #!/bin/bash
4dc047fb3633 adding removed files
gernotbelger
parents:
diff changeset
2
4dc047fb3633 adding removed files
gernotbelger
parents:
diff changeset
3 # Set this to your target database for Oracle
4dc047fb3633 adding removed files
gernotbelger
parents:
diff changeset
4 HOST=localhost
4dc047fb3633 adding removed files
gernotbelger
parents:
diff changeset
5 BACKEND_NAME="XE"
4dc047fb3633 adding removed files
gernotbelger
parents:
diff changeset
6 USER=flys28
4dc047fb3633 adding removed files
gernotbelger
parents:
diff changeset
7 PASS=flys28
4dc047fb3633 adding removed files
gernotbelger
parents:
diff changeset
8 # Alternatively you can provide a direct connection string:
4dc047fb3633 adding removed files
gernotbelger
parents:
diff changeset
9 # OGR_CONNECTION="PG:dbname=flys host=localhost port=63333 user=flys password=flys"
4dc047fb3633 adding removed files
gernotbelger
parents:
diff changeset
10
4dc047fb3633 adding removed files
gernotbelger
parents:
diff changeset
11 # Optional
4dc047fb3633 adding removed files
gernotbelger
parents:
diff changeset
12 VERBOSE=1
4dc047fb3633 adding removed files
gernotbelger
parents:
diff changeset
13 SKIP_AXIS=0
4dc047fb3633 adding removed files
gernotbelger
parents:
diff changeset
14 SKIP_KMS=0
4dc047fb3633 adding removed files
gernotbelger
parents:
diff changeset
15 SKIP_CROSSSECTIONS=0
4dc047fb3633 adding removed files
gernotbelger
parents:
diff changeset
16 SKIP_FIXPOINTS=0
4dc047fb3633 adding removed files
gernotbelger
parents:
diff changeset
17 SKIP_BUILDINGS=0
4dc047fb3633 adding removed files
gernotbelger
parents:
diff changeset
18 SKIP_FLOODPLAINS=0
4dc047fb3633 adding removed files
gernotbelger
parents:
diff changeset
19 SKIP_HYDR_BOUNDARIES=0
4dc047fb3633 adding removed files
gernotbelger
parents:
diff changeset
20 SKIP_HWS_LINES=0
4dc047fb3633 adding removed files
gernotbelger
parents:
diff changeset
21 SKIP_HWS_POINTS=0
4dc047fb3633 adding removed files
gernotbelger
parents:
diff changeset
22 SKIP_UESG=0
4dc047fb3633 adding removed files
gernotbelger
parents:
diff changeset
23 SKIP_DGM=0
4dc047fb3633 adding removed files
gernotbelger
parents:
diff changeset
24 SKIP_JETTIES=0
4dc047fb3633 adding removed files
gernotbelger
parents:
diff changeset
25 SKIP_FLOODMARKS=0
4dc047fb3633 adding removed files
gernotbelger
parents:
diff changeset
26
4dc047fb3633 adding removed files
gernotbelger
parents:
diff changeset
27 # Default encoding. Change here if necessary
4dc047fb3633 adding removed files
gernotbelger
parents:
diff changeset
28 export LC_ALL=de_DE@euro
4dc047fb3633 adding removed files
gernotbelger
parents:
diff changeset
29
4dc047fb3633 adding removed files
gernotbelger
parents:
diff changeset
30 # There should be no need to change anything below this line
4dc047fb3633 adding removed files
gernotbelger
parents:
diff changeset
31 GEW_FILE="$1"
4dc047fb3633 adding removed files
gernotbelger
parents:
diff changeset
32 RIVER_NAME=$(grep "Gew.sser" "$1" | sed 's/Gew.sser: //')
4dc047fb3633 adding removed files
gernotbelger
parents:
diff changeset
33
4dc047fb3633 adding removed files
gernotbelger
parents:
diff changeset
34 RIVER_PATH=$(grep "WSTDatei:" "$GEW_FILE" | awk '{print $2}')
4dc047fb3633 adding removed files
gernotbelger
parents:
diff changeset
35 RIVER_PATH=$(dirname "$RIVER_PATH")/../..
4dc047fb3633 adding removed files
gernotbelger
parents:
diff changeset
36 RIVER_PATH=$(readlink -f "$RIVER_PATH")
4dc047fb3633 adding removed files
gernotbelger
parents:
diff changeset
37
4dc047fb3633 adding removed files
gernotbelger
parents:
diff changeset
38 DIR=`dirname $0`
4dc047fb3633 adding removed files
gernotbelger
parents:
diff changeset
39 DIR=`readlink -f "$DIR"`
4dc047fb3633 adding removed files
gernotbelger
parents:
diff changeset
40
4dc047fb3633 adding removed files
gernotbelger
parents:
diff changeset
41 exec python $DIR/shpimporter/shpimporter.py \
4dc047fb3633 adding removed files
gernotbelger
parents:
diff changeset
42 --directory $RIVER_PATH \
4dc047fb3633 adding removed files
gernotbelger
parents:
diff changeset
43 --river_name "$RIVER_NAME" \
4dc047fb3633 adding removed files
gernotbelger
parents:
diff changeset
44 --ogr_connection "$OGR_CONNECTION" \
4dc047fb3633 adding removed files
gernotbelger
parents:
diff changeset
45 --host $HOST/$BACKEND_NAME \
4dc047fb3633 adding removed files
gernotbelger
parents:
diff changeset
46 --user $USER \
4dc047fb3633 adding removed files
gernotbelger
parents:
diff changeset
47 --password $PASS \
4dc047fb3633 adding removed files
gernotbelger
parents:
diff changeset
48 --verbose $VERBOSE \
4dc047fb3633 adding removed files
gernotbelger
parents:
diff changeset
49 --skip_axis $SKIP_AXIS \
4dc047fb3633 adding removed files
gernotbelger
parents:
diff changeset
50 --skip_kms $SKIP_KMS \
4dc047fb3633 adding removed files
gernotbelger
parents:
diff changeset
51 --skip_crosssections $SKIP_CROSSSECTIONS \
4dc047fb3633 adding removed files
gernotbelger
parents:
diff changeset
52 --skip_fixpoints $SKIP_FIXPOINTS \
4dc047fb3633 adding removed files
gernotbelger
parents:
diff changeset
53 --skip_buildings $SKIP_BUILDINGS \
4dc047fb3633 adding removed files
gernotbelger
parents:
diff changeset
54 --skip_floodplains $SKIP_FLOODPLAINS \
4dc047fb3633 adding removed files
gernotbelger
parents:
diff changeset
55 --skip_hydr_boundaries $SKIP_HYDR_BOUNDARIES \
4dc047fb3633 adding removed files
gernotbelger
parents:
diff changeset
56 --skip_uesgs $SKIP_UESG \
4dc047fb3633 adding removed files
gernotbelger
parents:
diff changeset
57 --skip_hws_lines $SKIP_HWS_LINES \
4dc047fb3633 adding removed files
gernotbelger
parents:
diff changeset
58 --skip_hws_points $SKIP_HWS_POINTS \
4dc047fb3633 adding removed files
gernotbelger
parents:
diff changeset
59 --skip_dgm $SKIP_DGM \
4dc047fb3633 adding removed files
gernotbelger
parents:
diff changeset
60 --skip_jetties $SKIP_JETTIES \
4dc047fb3633 adding removed files
gernotbelger
parents:
diff changeset
61 --skip_floodmarks $SKIP_FLOODMARKS \
4dc047fb3633 adding removed files
gernotbelger
parents:
diff changeset
62 2>&1

http://dive4elements.wald.intevation.org