2

I am trying to use the geetools library to export all the Sentinel-2 images available for the period 2020-2024 for a specific area to which I have clipped them, but I get the error

"---------------------------------------------------------------------------
AttributeError                            Traceback (most recent call last)
<ipython-input-4-eae3cb00aa70> in <cell line: 2>()
      1 # batch export to Google Drive
----> 2 geetools.batch.Export.imagecollection.toDrive(
      3         sentinel,
      4         'NDVI-Thailand_2023',
      5         namePattern='{id}',
AttributeError: module 'geetools' has no attribute 'batch'".

The code I am using is the following:

# batch export to Google Drive
geetools.batch.Export.imagecollection.toDrive(
        sentinel,
        'NDVI-Thailand_2023',
        namePattern='{id}',
        scale=10,
        dataType="uint16",
        region=geometry,
        maxPixels=int(1e13)
)

I have used this same batch export function many times in the past and it has worked perfectly, but suddenly it does not, even though the function is still available in the geetools repository.

1 Answer 1

0

I'm the new maintainer of the geetools lib. The project was on stale for a very long time as Rodrigo had less time to dedicate to the project. I am currently recoding everything using more modern and tested python function.

I think it's typically the use case presented in the documentation: https://geetools.readthedocs.io/en/stable/usage/migration.html

I don't know what you are doing with your imageCollection afterward but in case you analyse it with Xarray, be aware that v1 has a to_xarray method based on Xee package: https://geetools.readthedocs.io/en/stable/autoapi/geetools/ImageCollection/index.html#geetools.ImageCollection.ImageCollectionAccessor.to_xarray

more information can be found in this issue thread: https://github.com/gee-community/geetools/issues/256

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

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