Thursday 28 February 2019

google earth engine - "print()" alternative for nodeJS


i need run this code in my nodeJS application:


//Dates of Interest
var start = ee.Date("2014-10-01");
var finish = ee.Date("2018-05-01");


///--------------------- Landsat Collection ---------------------------------------///
var landsat = ee.ImageCollection('LANDSAT/LC08/C01/T1_TOA')
.filterDate(start, finish)
.filterBounds(roi);

// Year-Month-Day Extract function
function ymdList(imgcol){
var iter_func = function(image, newlist){
var date = ee.Number.parse(image.date().format("YYYYMMdd"));

newlist = ee.List(newlist);
return ee.List(newlist.add(date).sort())
};
return imgcol.iterate(iter_func, ee.List([]));
}

var ymd = ymdList(landsat);
print(ee.List(ymd).reduce(ee.Reducer.frequencyHistogram()));

But I do not know which function to use in place of "print ()", can anyone help me?





No comments:

Post a Comment

arcpy - Changing output name when exporting data driven pages to JPG?

Is there a way to save the output JPG, changing the output file name to the page name, instead of page number? I mean changing the script fo...