forked from OvertureMaps/overture-tiles
-
Notifications
You must be signed in to change notification settings - Fork 0
/
run.sh
executable file
·26 lines (20 loc) · 897 Bytes
/
run.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
set -e
set -u
set -x
# Automation script for running inside Docker on AWS Batch.
BUCKET=$1
THEME=$2
RELEASE_DATA="2024-07-22.0"
# Trim the patch version: 2024-06-13-beta.1 -> 2024-06-13-beta
RELEASE_TILESET="${RELEASE_DATA%%.*}"
# Download the full theme to /data.
aws s3 sync --no-progress --region us-west-2 --no-sign-request s3://overturemaps-us-west-2/release/$RELEASE_DATA/theme=$THEME /data/theme=$THEME
# Tile and upload the theme to the target bucket.
if [ "$THEME" == "admins" ] || [ "$THEME" == "places" ] || [ "$THEME" == "divisions" ]; then
bash scripts/$RELEASE_TILESET/$THEME.sh /data $THEME.pmtiles
aws s3 cp --no-progress $THEME.pmtiles s3://$BUCKET/$RELEASE_TILESET/$THEME.pmtiles
else
className="${THEME^}"
java -cp planetiler.jar /profiles/$className.java --data=/data
aws s3 cp --no-progress /data/$THEME.pmtiles s3://$BUCKET/$RELEASE_TILESET/$THEME.pmtiles
fi