Skip to content

Instantly share code, notes, and snippets.

@emxsys
Last active October 5, 2022 12:05
Show Gist options
  • Save emxsys/58e456b11829e075c69afa4c79729ed9 to your computer and use it in GitHub Desktop.
Save emxsys/58e456b11829e075c69afa4c79729ed9 to your computer and use it in GitHub Desktop.
How to bulk download SRTMv4 DEMs from CGIAR-CSI

How to bulk download SRTMv4 from CGAIR-CSI with WGET

The SRTM digital elevation data provided on CGIAR-CSI has been processed to fill data voids and to facilitate its ease of use by a wide group of potential users. This data is provided in an effort to promote the use of geospatial science and applications for sustainable development and resource conservation in the developing world. Digital elevation models (DEM) for the entire globe, covering all of the countries of the world, are available for download at CGIAR-CSI.

Step 1. Get a bulk download link from CGIAR-CSI

Request Bulk Download from the CGIAR-CSI SRTM 90m Digital Elevation Database v4.1 web page.

In a subsequent email from CGIAR-CSI, visit the "one big package file with all the tiles (27 GB)" Google Drive link.

Step 2. Get the ID of the file to download

Get a shareable link from Google Drive by right-clicking the SRTMv4.zip file and selecting Get Shareable Link.

Examine the link to get the file's ID. Example:

https://docs.google.com/open?id=[ID]

Step 3. Download the file with WGET

Build a download URL using the ID obtained in Step 2. Example:

https://drive.google.com/uc?export=download&id=[ID]

Run WGET with the URL. Usage: wget [OPTION]... [URL].... Example:

wget -O [filename] --no-check-certificate -r 'https://drive.google.com/uc?export=download&id=[ID]'

Options used:
-O, --output-document=FILE  writes document to FILE
--no-check-certificate      don't validate the server's certificate
-r                          recursive
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment