geetools icon indicating copy to clipboard operation
geetools copied to clipboard

Exporting an `ee.ImageCollection`

Open fitoprincipe opened this issue 11 months ago • 4 comments

this Issue made me realize that the function to export an image collection has not been implemented in the same way as the older version of this package. The main difference, that I'd like to see "restored", is the ability to create the file names using the image properties (namePattern argument).

https://github.com/gee-community/geetools/blob/918abab53c903b6d1aaebfc83a7262dcf6fcba33/geetools/batch/imagecollection.py#L9-L11

Also, I think that this line

https://github.com/gee-community/geetools/blob/14fdc796fc471e27c2ada9196f923a747077d011/geetools/ee_export.py#L81

forces the collection to be computed as a list, due to

https://github.com/gee-community/geetools/blob/14fdc796fc471e27c2ada9196f923a747077d011/geetools/ee_export.py#L76

if the collection had an intense computation it might fail due to memory issues. Instead, I propose to loop over the system:index property, which by definition is always unique (this was not the way it was coded in the previous version)

fitoprincipe avatar Feb 11 '25 16:02 fitoprincipe

Yeah sorry i was super tired of refactoring when I did batch module so I started being lazy with some mechanisms. I'll reimplement the namePattern one ASAP.

12rambau avatar Feb 11 '25 22:02 12rambau

if the collection had an intense computation it might fail due to memory issues. Instead, I propose to loop over the system:index property, which by definition is always unique (this was not the way it was coded in the previous version)

Do you mean extracting the system:index with a aggregate array and then use it as a filter in the loop ?

12rambau avatar Feb 11 '25 22:02 12rambau

Yeah sorry i was super tired of refactoring when I did batch module so I started being lazy with some mechanisms. I'll reimplement the namePattern one ASAP.

it's not urgent, not need to do it ASAP. I could also do it if you want.

fitoprincipe avatar Feb 11 '25 22:02 fitoprincipe

if the collection had an intense computation it might fail due to memory issues. Instead, I propose to loop over the system:index property, which by definition is always unique (this was not the way it was coded in the previous version)

Do you mean extracting the system:index with a aggregate array and then use it as a filter in the loop ?

exactly 👍

fitoprincipe avatar Feb 11 '25 22:02 fitoprincipe