Skip to content

Instantly share code, notes, and snippets.

@borjan-val
borjan-val / gaiasky.sh
Last active July 11, 2025 02:39
Scrape and stitch sky reconstructed from GAIA EDR3
# https://www.esa.int/ESA_Multimedia/Images/2020/12/Interactive_map_of_the_sky_from_Gaia_s_Early_Data_Release_3
# In the end you'll be left with 800 1024x1024 PNGs in the "parts" directory and one combined "sky-final.tiff"
mkdir -p parts
for y in {0..19}; do
for x in {0..39}; do
curl "https://iiif.micr.io/eKXez/$((1024 * ${x})),$((1024 * ${y})),1024,1024/1024,/0/color.png" -o "parts/${y}_${x}.png"
done
done
vips arrayjoin "$(ls parts/*.png)" sky-temp.tiff --across=40
vips crop sky-temp.tiff sky-final.tiff 0 0 40000 20000