[GIS] Downloading entire image collection from GEE with metadata

google-earth-engine

I develop code in python using Google Earth Engine Python API, to download the entire collection of NOAA LAI that is stored in GEE. Despite the fact that the whole downloading process is painfully slow, I noticed that the downloaded data does not come with the original metadata. Below is the code that I developed using the tool of Rodrigo E. Principe

Here is my code.

from geetools import batch
import ee

ee.Initialize()

collection = ee.ImageCollection('NOAA/CDR/AVHRR/LAI_FAPAR/V4').select('LAI')
reference = collection.filterDate('1981-12-31', '1982-12-31')
tasks = batch.ImageCollection.toDrive(reference, 'MyFolder', scale=5000)

How can I download the data in a faster way (if possible) with the original metadata?

Best Answer

Presence of metadata in the downloaded raster

I had to check before answering. After reading this and this and inspecting the metadata with rasterio, QGIS and gdalinfo, I can tell you that images downloaded from Google Earth Engine do not carry the metadata (called "tags" by rasterio). It's not an issue of geetools.

If you want to keep metadata information (called "properties" by Earth Engine), you can upload the raster to an Asset (Google give you 250GB of storage!). You can use geetools.batch.ImageCollection.toAsset

Download speed

The function batch.ImageCollection.toDrive of geetools package is just an iteration over each image of the collection to call ee.batch.Export.image.toDrive, after the task has started, the process goes on in Goolge's servers, so once again, geetools has nothing to do with it.

Related Question