When Google Earth Engine uses a loop to download ImageCollection, there is no need for a RUN method

After running our own Javascript program, there are multiple RUNs that we need to click. At this time, press F12 and enter the following code in the console to run batches.

function runTaskList() {
    
    
    var tasklist = document.getElementsByClassName('awaiting-user-config');
    for (var i = 0; i < tasklist.length; i++)
        tasklist[i].children[2].click();
}
function confirmAll() {
    
    
    var ok = document.getElementsByClassName('goog-buttonset-default goog-buttonset-action');
    for (var i = 0; i < ok.length; i++)
        ok[i].click();
}
runTaskList();
confirmAll();

At the same time, you can cancel the download in batches if you download it wrong, but not all of them, only the currently displayed ones.

function runTaskList() {
    
    
var tasklist = document.getElementsByClassName('indicator');
for (var i = 0; i < tasklist.length; i++)
tasklist[i].click();
}
function confirmAll() {
    
    
var ok = document.getElementsByClassName('goog-buttonset-default goog-buttonset-action');
for (var i = 0; i < ok.length; i++)
ok[i].click();
}
runTaskList();
confirmAll();

Reference link

Guess you like

Origin blog.csdn.net/qq_36321330/article/details/108892882