-
Notifications
You must be signed in to change notification settings - Fork 6
/
Copy pathclear_database
executable file
·88 lines (81 loc) · 941 Bytes
/
clear_database
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
#!/usr/bin/env bash
LC_NUMERIC=C
LC_COLLATE=C
ZOOM=8
case "$1" in
CentralEurope)
x1=136
y1=83
x2=144
y2=90
;;
SouthEurope)
x1=131
y1=91
x2=143
y2=95
;;
NordEurope)
x1=136
y1=73
x2=144
y2=82
;;
NordEastEurope)
x1=145
y1=73
x2=155
y2=82
;;
NordWestEurope)
x1=121
y1=73
x2=135
y2=81
;;
SouthSouthEurope)
x1=128
y1=96
x2=152
y2=101
;;
WestEurope)
x1=130
y1=82
x2=135
y2=90
;;
SouthWestEurope)
x1=121
y1=91
x2=130
y2=100
;;
SouthEastEurope)
x1=144
y1=91
x2=155
y2=95
;;
WestWestEurope)
x1=121
y1=82
x2=130
y2=90
;;
*)
X1=11.3 #-20
X2=22.6 #53
Y1=46.4 #80
Y2=52.6 #30
x1=$(./extract-aster/lon2x $X1 $ZOOM)
y1=$(./extract-aster/lat2y $Y1 $ZOOM)
x2=$(./extract-aster/lon2x $X2 $ZOOM)
y2=$(./extract-aster/lat2y $Y2 $ZOOM)
;;
esac
for x in $(eval echo {$x1..$x2}); do
for y in $(eval echo {$y1..$y2}); do
printf "DROP DATABASE gis_eu_%d_%d" $x $y | psql -d postgres
done;
done;