The GEES2Downloader, as its name suggests, is a simple downloader for S2 imagery from Google Earth Engine. The objective is to overcome the limitations imposed by GEE when downloading assets directly through HTTP protocol.
In these situations, the GEES2Downloader is able to subdivide the asset in smaller tiles and download them separately to recreate the original array (Figura 1). The number of tiles is given automatically by the algorithm and the download occurs in parallel.
A Medium story describes in details its utilization:
https://medium.com/analytics-vidhya/how-to-download-assets-from-google-earth-engine-gee-and-overcome-the-size-limitations-45b7c9ebe389
The package can be installed directly from the github, using pip, like so:
pip install git+https://github.com/cordmaur/GEES2Downloader.git@main
Or cloning the project and installing in editor mode to access the code:
git clone https://github.com/cordmaur/GEES2Downloader.git
cd GEES2Downloader
pip install -e .
To check if it is correctly installed:
python
>>> import geeS2downloader
>>> geeS2downloader.__version__
'0.0.1'
The usage is really simple.
Note: img is a ee.Image and band is a string with the name of the band.
from geeS2downloader import GEES2Downloader
downloader = GEES2Downloader()
downloader.download(img, band)
To visualize the the downloaded asset:
plt.imshow(downloader.array)
A story explaining in more details can be found here: https://medium.com/analytics-vidhya/how-to-download-assets-from-google-earth-engine-gee-and-overcome-the-size-limitations-45b7c9ebe389