forked from openmaptiles/openmaptiles
-
Notifications
You must be signed in to change notification settings - Fork 4
/
Copy pathpbfStats.sh
executable file
·40 lines (33 loc) · 1.1 KB
/
pbfStats.sh
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
#!/bin/bash
set -o errexit
set -o pipefail
set -o nounset
source .env
AREA=$1
cd ./data
DOCKER_COMPOSE_FILE=docker-compose-config.yml
if [ -f ${DOCKER_COMPOSE_FILE} ]; then
rm ${DOCKER_COMPOSE_FILE}
fi
lon_min=$( cat osmstat.txt | grep "lon min:" |cut -d":" -f 2 )
lon_max=$( cat osmstat.txt | grep "lon max:" |cut -d":" -f 2 )
lat_min=$( cat osmstat.txt | grep "lat min:" |cut -d":" -f 2 )
lat_max=$( cat osmstat.txt | grep "lat max:" |cut -d":" -f 2 )
timestamp_max=$( cat osmstat.txt | grep "timestamp max:" |cut -d" " -f 3 )
echo "--------------------------------------------"
echo BBOX: "$lon_min,$lat_min,$lon_max,$lat_max"
echo TIMESTAMP MAX = $timestamp_max
echo QUICKSTART_MIN_ZOOM: "$QUICKSTART_MIN_ZOOM"
echo QUICKSTART_MAX_ZOOM: "$QUICKSTART_MAX_ZOOM"
echo "--------------------------------------------"
cat > $DOCKER_COMPOSE_FILE <<- EOM
version: "2"
services:
generate-vectortiles:
environment:
BBOX: "$lon_min,$lat_min,$lon_max,$lat_max"
OSM_MAX_TIMESTAMP : "$timestamp_max"
OSM_AREA_NAME: "$AREA"
MIN_ZOOM: "$QUICKSTART_MIN_ZOOM"
MAX_ZOOM: "$QUICKSTART_MAX_ZOOM"
EOM