How to Download Assets from Google Earth Engine (GEE) and Overcome the Size Limitations

Learn a workaround that can be applied to avoid the annoying limitation set by Google to download contents directly to your local machine

Maurício Cordeiro
Analytics Vidhya
Published in
5 min readNov 24, 2021

--

Photo by NASA on Unsplash

Introduction

When I started using Google Earth Engine (GEE) back in 2018, I found it an amazing idea to have all the satellite imagery datasets in the cloud, and accessing them in such on-demand basis. Once we understand that the computations happen on the server side, through the Earth Engine API, and it is done “on-the-fly” for any region in the globe it is really game changing. Google announces planetary-scale analysis capabilities. And, in fact, it is.

However, if we need to interact with other datasets not available on their cloud or if we need to apply an algorithm that is not supported by their API, things are more challenging. Additionally, while the built-in code editor (javascript) is really quick to get started (for experimenting their API and visualizing the results), it is very limiting for a more heavy-use scenario. Additionally, using GEE from the Python API was not straightforward enough at the time. It seems that the geemap package developed by professor Qiusheng Wu from University of Tennessee comes to change this, but I will leave this review for a next story.

The Problem

Because of these aforementioned reasons, my GEE use has been limited to lightweight uses, when I need quick access to some data without bothering with the download process that is usually painful across the various providers. As an example, I’ve been using GEE in the past to create training patches for a Deep Learning model, as explained in the story : Creating training patches for Deep Learning Image Segmentation of Satellite (Sentinel 2) Imagery using the Google Earth Engine (GEE).

However, one limitation still bothers me. It is annoying (and slow) to get results out of there. There is a batch export engine to google drive (but I don’t have much storage there) and through the http protocol they limit the grid size in 10,000 pixels and also overall size for each download. For high resolution images from Sentinel 2, it is…

--

--

Maurício Cordeiro
Analytics Vidhya

Ph.D. Geospatial Data Scientist and water specialist at Brazilian National Water and Sanitation Agency. To get in touch: https://www.linkedin.com/in/cordmaur/