1

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?

2

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.

  • Thank you Rodrigo for your answer. I changed the last line in my code with this one: tasks = batch.ImageCollection.toAsset(reference, 'LAI_2000', scale=5000) and it return the following error:Assets can only be created in folders or collections. No parent name found in the specified asset name: 'LAI_2000'. The weird is that I have a folder named LAI_2000 in my assets. Am I missing something here? – Dimitris Kasabalis Apr 9 at 8:38
  • Hi @DimitrisKasabalis, try using the complete assetID, since I have't made that step yet (simplifying that process). For example: tasks = batch.ImageCollection.toAsset(reference, 'users/yourusername/LAI_2000', scale=5000) – Rodrigo E. Principe Apr 9 at 12:27

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.