Generating a BOM rain radar gif

The Australian Bureau of Meteorology uses stacked transparent gifs for their rain radar images. This means you can’t just link to the latest radar image on their site – if you do, you get something that looks like this:

The BOM rain radar image for Brisbane, Australia.
What you get when you right-click -> copy image url on a rain radar image.

They’ve done this for entirely legitimate reasons. Because the final image you see on the page is a composit of stacked transparent layers, it means you can configure what layers you see without their servers having to deliver a slightly tweaked version of the large rainfall gif.

Annoyingly, this means it’s hard to post a rainfall gif in something like slack. To that end, I made a solution:

The full composited BOM rain radar image for Brisbane, Australia.
The full composited BOM rain radar image for Brisbane, Australia.

The script at that url (https://bom.caseyfulton.com) fetches all the requisite images and composites them into a single gif using the PHP GD library.

The full composited BOM rain radar image for Melbourne, Australia.
You can set the radar to whichever you want with the radarId param: https://bom.caseyfulton.com/?radarId=IDR023

Check out the code on GitHub: https://github.com/caseyfw/bom-gif