Export an ImageCollection to Google Drive


In [ ]:
import ee
ee.Initialize()

In [ ]:
import geetools

In [ ]:
import ipygee as ui

Define an ImageCollection


In [ ]:
site = ee.Geometry.Point([-72, -42]).buffer(1000)

In [ ]:
collection = ee.ImageCollection("LANDSAT/LC08/C01/T1_SR").filterBounds(site).limit(5)

Set parameters


In [ ]:
help(geetools.batch.Export.imagecollection.toDrive)

In [ ]:
bands = ['B2', 'B3', 'B4']
scale = 30
name_pattern = '{sat}_{system_date}_{WRS_PATH:%d}-{WRS_ROW:%d}'
date_pattern = 'ddMMMy' # dd: day, MMM: month (JAN), y: year
folder = 'MYFOLDER'
data_type = 'uint32'
extra = dict(sat='L8SR')
region = site

Export


In [ ]:
tasks = geetools.batch.Export.imagecollection.toDrive(
            collection=collection,
            folder=folder,
            region=site,
            namePattern=name_pattern,
            scale=scale,
            dataType=data_type,
            datePattern=date_pattern,
            extra=extra,
            verbose=True,
            maxPixels=int(1e13)
        )

In [ ]: