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