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