I am trying to download images from Landsat's EVI collection off of Google Earth Engine. I saw another similar post here: EVI or NDVI collection image download that talked about the same issue. One response was to create a "for loop", which I have done. When I run my code though, nothing happens. I get no errors but also nothing is downloaded and there are no tasks. What am I doing wrong? I am new to google earth engine.
// Exporting Landsat 8 Images
var roi = ee.Geometry.Rectangle([-150.0, 8.0, -34.0, 84.0]);
// Load EVI collection
var eviCol = ee.ImageCollection("LANDSAT/LC08/C01/T1_8DAY_EVI")
.filterDate('2022-05-01', '2022-08-31')
.filterBounds(roi)
.sort('CLOUD_COVER')
.select('EVI');
var eviList = eviCol.toList(eviCol.size());
var colorizedVis = {
min: 0,
max: 1,
palette: [
'ffffff', 'ce7e45', 'df923d', 'f1b555', 'fcd163', '99b718', '74a901',
'66a000', '529400', '3e8601', '207401', '056201', '004c00', '023b01',
'012e01', '011d01', '011301'
],
};
for (var i = 0; i < eviCol.size().getInfo; i++) {
var image = ee.Image(eviList.get(i));
// Add the colorized EVI layer to the map
Map.addLayer(image.clip(roi), colorizedVis, 'Colorized');
// Export to Drive with consistent visualization settings
Export.image.toDrive({
image: image,
description: 'Landsat2022_NA' + i,
scale: 30,
region: roi,
});
}