Skip to content

Commit

Permalink
Update timezone areas for 2024b
Browse files Browse the repository at this point in the history
  • Loading branch information
aapeliv committed Sep 25, 2024
1 parent a664750 commit 6315b2d
Show file tree
Hide file tree
Showing 3 changed files with 32 additions and 1 deletion.
25 changes: 25 additions & 0 deletions timezone_areas/deps.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
#!/bin/bash

# works on ubuntu 22.04, tested on AWS
# installs docker, docker-compose, aws-cli

set -e

# update, upgrade
sudo apt -y update
sudo apt -y dist-upgrade

# install docker
sudo apt install -y apt-transport-https ca-certificates curl gnupg-agent software-properties-common
sudo install -m 0755 -d /etc/apt/keyrings
sudo curl -fsSL https://download.docker.com/linux/ubuntu/gpg -o /etc/apt/keyrings/docker.asc
sudo chmod a+r /etc/apt/keyrings/docker.asc
echo \
"deb [arch=$(dpkg --print-architecture) signed-by=/etc/apt/keyrings/docker.asc] https://download.docker.com/linux/ubuntu \
$(. /etc/os-release && echo "$VERSION_CODENAME") stable" | \
sudo tee /etc/apt/sources.list.d/docker.list > /dev/null
sudo apt update
sudo apt install -y docker-ce docker-ce-cli containerd.io docker-compose-plugin
sudo usermod -aG docker $(whoami) # make me able to use docker without sudo

sudo apt install -y gdal-bin unzip
8 changes: 7 additions & 1 deletion timezone_areas/generate.sh
Original file line number Diff line number Diff line change
@@ -1,8 +1,14 @@
#!/bin/bash
set -e

# run postgis in docker while doing this:
docker run -d --rm --name tz_pg -p 5433:5433 -e POSTGRES_PASSWORD=local -e PGPORT=5433 postgis/postgis

echo "Waiting for postgis to prepare"
sleep 10

# pull the timezone areas from https://github.com/evansiroky/timezone-boundary-builder
wget https://github.com/evansiroky/timezone-boundary-builder/releases/download/2020d/timezones-with-oceans.shapefile.zip
wget https://github.com/evansiroky/timezone-boundary-builder/releases/download/2024b/timezones-with-oceans.shapefile.zip
unzip timezones-with-oceans.shapefile.zip

# convert to pg dump
Expand Down
Binary file modified timezone_areas/timezone_areas.sql.zst
Binary file not shown.

0 comments on commit 6315b2d

Please sign in to comment.