I am trying to download time series ET. But the batch tool is not working. Error:
In users/fitoprincipe/geetools:batch
Line 133: collection.size is not a function
var batch = require('users/fitoprincipe/geetools:batch');
var extent = ee.FeatureCollection("users/waqas50125012/KPK");
var StartDate = '2010-01-01';
var EndDate = '2010-12-31';
var dataset = ee.ImageCollection('MODIS/006/MOD16A2').select('ET').filterDate(StartDate,EndDate);
function clp(img) {
return img.clip(extent);
}
var clip = dataset.map(clp);
var ET = clip.select('ET');
Map.centerObject(extent);
var evapotranspirationVis = {
min: 0.0,
max: 300.0,
palette: [
'ffffff', 'fcd163', '99b718', '66a000', '3e8601', '207401', '056201',
'004c00', '011301'
],
};
Map.addLayer(ET, evapotranspirationVis, 'ET');
Map.addLayer(extent);
batch.Download.ImageCollection.toDrive({
image: ET.select('ET'),
description: 'ET',
scale: 30,
region: extent,
maxPixels: 1e13,
});
var plotET = ui.Chart.image.series(ET.select('ET'), extent)
.setOptions({
title: 'ET short-term time series',
hAxis: {title: 'Date'},
vAxis: {title: 'ET'}
});
// Display.
print(plotET);
users/fitoprincipe/geetools:batch
module, see: github.com/fitoprincipe/geetools-code-editor/wiki/Batch