Skip to content

Instantly share code, notes, and snippets.

@aldoridhoni
Last active September 13, 2022 20:05
  • Star 1 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
Star You must be signed in to star a gist
Save aldoridhoni/2a9740721f6d9bb5ef958590064a2acc to your computer and use it in GitHub Desktop.
Batch Download ALOS from JAXA
#!/bin/bash
# Indonesia
for long in {090..160..5}; do
# north side
for lat in {020..000..-5}; do
file="N${lat}E${long}_N$(printf '%03d' $((10#$lat + 05)))E$(printf '%03d' $((10#$long + 05))).tar.gz"
wget -nc ftp://ftp.eorc.jaxa.jp/pub/ALOS/ext1/AW3D30/release_v1804/$file
done
# khatulistiwa
file="S005E${long}_N000E$(printf '%03d' $((10#$long + 05))).tar.gz"
wget -nc ftp://ftp.eorc.jaxa.jp/pub/ALOS/ext1/AW3D30/release_v1804/$file
# south side
for lat in {010..020..5}; do
file="S${lat}E${long}_S$(printf '%03d' $((10#$lat - 05)))E$(printf '%03d' $((10#$long + 05))).tar.gz"
wget -nc ftp://ftp.eorc.jaxa.jp/pub/ALOS/ext1/AW3D30/release_v1804/$file
done
@NBrown140
Copy link

Thank you, this helped me write a script to download the whole dataset.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment