0

This question already has an answer here:

I want to clip a MODIS image collection to an area defined by a bounding box in Google Earth Engine and then export the images separately to my google drive. I want to use a map function to avoid for loop, but the export module parameters can not be dynamically set. For example, for the description (that would be the file name), I want it to be equal to the id of each individual image. However, export module expect a string for name and can not accept a computed object. getInfo() also doesn't work in mapped functions.

var imageCol = MODIS.select('LST_Day_1km').filterDate(startDate, endDate);
var clippedCol = imageCol.map(function(image){   
    var clipped = image.clip(Bbox);   
    Export.image.toAsset({
       image: clipped,
       description: image.metadata('system:index'),
       region: Bbox,
       scale: 1000
    });   
    return clipped   });

Any clue?

marked as duplicate by aldo_tapia, Community Aug 1 '18 at 17:10

This question has been asked before and already has an answer. If those answers do not fully address your question, please ask a new question.

1

Is a duplicate, but an answer with less code lines is:

// load tools from Fito Principe
var tools = require('users/fitoprincipe/geetools:tools');

// add col2drive function
var exportfunction = tools.col2drive;

// export collection to google drive
exportfunction(coll,'coll_name',{other parameters});

Part of a set of useful functions from Rodrigo E. Principe.

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