Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Exporting an ee.ImageCollection #430

Open
fitoprincipe opened this issue Feb 11, 2025 · 4 comments
Open

Exporting an ee.ImageCollection #430

fitoprincipe opened this issue Feb 11, 2025 · 4 comments

Comments

@fitoprincipe
Copy link
Member

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).

def toDrive(collection, folder, namePattern='{id}', scale=30,
dataType="float", region=None, datePattern=None,
extra=None, verbose=False, **kwargs):

Also, I think that this line

loc_id = locImage.get(index_property).getInfo()

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

imageList = imagecollection.toList(nb_images)

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)

@12rambau
Copy link
Member

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
Copy link
Member

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 ?

@fitoprincipe
Copy link
Member Author

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
Copy link
Member Author

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 👍

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants