从初始日期到最新日期过滤imageCollection

时间:2019-01-30 16:58:19

标签: google-earth-engine

我正在使用Google Earth Engine应用程序。为了使其运行而无需更改代码,我需要指定日期范围以过滤ImageCollection。起始日期应为任意日期,但最后日期应为可用的“最新”日期。 如果有人知道如何打开对话框以让用户指定起始日期,那也很好。

var app = function (image)
    {
    //NDVI
    var ndvi = image.normalizedDifference(['B8', 'B4']);
    image = image.addBands(ndvi.rename('NDVI'));
    return image;
    }

var OLI = ee.ImageCollection("COPERNICUS/S2")
    .filterDate('2016-10-01','2019-01-29')
    .filterMetadata('CLOUDY_PIXEL_PERCENTAGE','less_than',10)
    //.map aplica la funcion "app" definida previamente a la ImageCollection
    .filterBounds(table)
    .map(app);

0 个答案:

没有答案