How to Download Remote Sensing Data with Python
How to bulk download data with existing open-source download scripts, or your with your own one.
Downloading data is one of the first steps in almost any remote sensing pipeline, so we need to get our data download solved easily and effectively.
To download data from a specific satellite product, you can rely on many existing open-source tools. In the case there is no one available for the product of your interest, writing your download scripts can be easily accomplished by resorting to ‘web scraping’ Python packages.
Register as a User at some Space Agency Data Providers
- For NASA, a popular service is NASA’s Earth Observing System Data and Information System (EOSDIS).
- For the European Space Agency, visit the Sentinel Open Access Hub for registration.
Make sure to read the terms and conditions of each data provider. For example, all of NASA’s data is not only freely available, but it is also in the public domain. However, if you download data from Google Earth Engine, those terms do not longer apply and the data becomes free for non-commercial use. (Read my post on some of the limitations of GEE).
Existing open-source download scripts written in Python
Here you can find a few useful Python libraries that can be used to automatically fetch data from specific satellite products:
Write your own download scripts
Bear in mind that some of the open-source packages available online are not developed by the space agencies themselves, but rather by a remote sensing practitioner that solved a problem using python and kindly shared her code. Therefore, it should come as no surprise if some of these packages end up going unmaintained and stop working, or that they are hard to use and poorly documented.
For these reasons, it could be valuable to learn how to write your own python scripts to download data. Fortunately, automatic bulk download of data is a task that can be easily and effectively accomplished with Python. We might be also interested in writing our own scripts, for example, in the case there is no easy-to-use existing library for the data we are interested in. This is quite typical, as the amount of available data products is growing rapidly.
If you want to dig into this, you can read my post on how to do this: Download an Https Directory with Authentication in Python
A Python Script to Download SMAP, IMERG and MODIS data
I’ve used the procedure outlined in my post to write my own script, which automatically fetches data from SMAP, IMERG and MODIS.
The script is only 55 lines of code, and can be easily modified to download almost any satellite product.