Skip to content
Weather radar simplified
Branch: master
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
frontend
image-server
tile-generation
tile-server
.gitignore
README.md

README.md

Cloudspotting.app

Weather radar simplified - a web app that shows every Australian Bureau of Meteorology radar image animated map in your exact location

** Live at cloudspotting.app and in very active development! **

Very few tests and very early stage codebase - please don't take this as an indication of my best development!

A tileserver which georeferences BOM images and generates slippy map tilesets with Python GDAL and ImageMagick, served up to a Mapbox OpenGL slippy map using an OpenStreetMap cache.

More info and a better readme to come!

Setup

Install Node and related dependencies

sudo apt-get install nodejs -y

Install yarn

curl -sS https://dl.yarnpkg.com/debian/pubkey.gpg | sudo apt-key add -
echo "deb https://dl.yarnpkg.com/debian/ stable main" | sudo tee /etc/apt/sources.list.d/yarn.list
sudo apt-get update
sudo apt-get install yarn -y

Install ImageMagick

  • enable the source packages within the /etc/apt/sources.list file by uncommenting deb-src of Ubuntu's main repository. Uncomment the line deb http://archive.ubuntu.com/ubuntu/ bionic main restricted

  • Install ImageMagick from source. You want ImageMagick 7.0.8-0 - apt-get won't get you that as of 2/11/19 :)

sudo apt-get install build-essential checkinstall -y
sudo apt-get build-dep imagemagick -y
wget https://www.imagemagick.org/download/ImageMagick-7.0.8-27.tar.gz
tar -xzvf ImageMagick-7.0.8-27.tar.gz
cd ImageMagick-7.0.8-27/
./configure
make
sudo checkinstall
cd ..
rm ImageMagick-7.0.8-27.tar.gz
rm -rf ImageMagick-7.0.8-27/

(To uninstall dpkg -r imagemagick-7.0.8)

Install gdal

#sudo add-apt-repository ppa:ubuntugis-unstable
sudo add-apt-repository ppa:ubuntugis/ubuntugis-unstable
sudo apt-get install gdal-bin -y

Install gdal-python

sudo apt-get install python-gdal -y

Install Node dependencies

  • run yarn inside tile-generation/

Install Caddy web server

See https://caddyserver.com/download

Most likely you can run:

curl https://getcaddy.com | bash -s personal http.cors

Running

Run the radar image server

cd image-server/sorted-images/
../multithreaded-cords.py

Run the radar image fetching and tile generation

cd image-server/
python3 autopull.py

Run the Caddy tile server

cd tile-server

# You'll need to make your own file here :)
# For my reference, if running tiles1:
sudo caddy -conf tiles1-Caddyfile

# If running tiles2:
sudo caddy -conf tiles2-Caddyfile

Rough program flow of tile generation

(Yep, there's a lot to clean up!)

  • Python executes tick() every minute
  • Python calls downloadNewImages() for one specific timestring
  • downloadNewImages() calls controlled-pull-images.sh
  • controlled-pull-images.sh calls main.sh for tile generation
  • main.sh calls
    • compile.sh while compiles the TS
    • clean.sh which cleans the working dir
    • calls georeference-images.js
      • calls georeference-image.sh for each image with correct args
        • calls gdal utilities
    • calls migrate.sh which does merging and tiling
You can’t perform that action at this time.