-
Notifications
You must be signed in to change notification settings - Fork 6
/
generate_metatile
executable file
·75 lines (61 loc) · 1.33 KB
/
generate_metatile
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
#!/usr/bin/env bash
case "$3" in
18)
hillshade_opacity=0.5
;;
17)
hillshade_opacity=0.6
;;
16)
hillshade_opacity=0.7
;;
15)
hillshade_opacity=0.8
;;
14)
hillshade_opacity=0.9
;;
*)
hillshade_opacity=1.0
;;
esac
MAPNIK_MAP_FILES="landcover;hillshade;contour;accessarea;way;building;ferry;route;boundary;fishnet;text"
LAYER_OPTIONS="{\"1\":{\"colorToAlpha\": [255,255,255,255], \"opacity\": $hillshade_opacity},\"8\":{\"colorToAlpha\": [255,255,255,255], \"opacity\": 0.6}}"
MAPNIK_MAP_PATH="/root/map1/stylesheets/eu/$1.$2/$3"
TILE_PATH="/root/map1/map/tiles"
echo $LAYER_OPTIONS;
#LAYER_OPTIONS='{"0":{"colorToAlpha": [255,255,255,255], "opacity": 1.0},"1":{"colorToAlpha": [255,255,255,255], "opacity": 0.5}}'
#MAPNIK_MAP_FILES="hillshade;boundary;contour"
#MAPNIK_MAP_FILES="ferry"
#LAYER_OPTIONS='{}'
export MAPNIK_MAP_FILES
export LAYER_OPTIONS
export MAPNIK_MAP_PATH
export TILE_PATH
case "$4" in
Zizkov)
BB="14.45,50.074,14.48,50.093"
;;
Praha)
BB="14.239,49.956,14.645,50.159"
;;
Jilove)
BB="14.362,49.845,14.622,49.954"
;;
Jizerky)
BB="15.041,50.728,15.373,50.896"
;;
Tatry)
BB="19.594,48.88,20.629,49.478"
;;
OkoliTurnova)
BB="14.9590694,50.3987186,15.6006272,50.8716425"
;;
PecPodSnezkou)
BB="15.6851092,50.6206644,15.8456919,50.6989886"
;;
*)
BB=$4
;;
esac
python ./generate_metatile.py $1 $2 $3 $BB