I'm trying to export all the images in an ImageCollection to Google Drive and by default name the output image with the date using format() function. However, when I try to name a export task by a date, the name in tasks is something like:
ee.String({ "type": "Invocation", "arguments": { "date": { "type": "Invocation", "arguments": { "value": { "type": "Invocation", "arguments": { "object": { "type": "ArgumentRef", "value": "_MAPPING_VAR_0_0" }, "property": "system:time_start" }, "functionName": "Element.get" } }, "functionName": "Date" }, "format": "YYYY-MM-DD" }, "functionName": "Date.format" })
Note the date values are gone and only some of the images are exported. Here's the link to the code
All I need is only a formatted string from a date object.
Is there a simpler way to export an image collection?
Export
is a client side function, whilemap
is a server side funtion. What you want to achieve will only work if you create a client side loop (for.. in...
).