我可以使用网络上的代码示例从OLS数据集中逐年选择图像:
// Load a Japan boundary from a Fusion Table.
var japan = ee.FeatureCollection('ft:1tdSwUL7MVpOauSgRzqVTOwdfy17KDbw-1d9omPw')
.filter(ee.Filter.eq('Country', 'Japan'));
// Load a 2012 nightlights image, clipped to the Japan border.
var nl2012 = ee.Image('NOAA/DMSP-OLS/NIGHTTIME_LIGHTS/F182009')
.select('stable_lights')
.clipToCollection(japan);
然而,当我尝试使用ImageCollection时,我无法像其他数据集一样按日期选择(例如Landsat):
var collection = ee.ImageCollection('LANDSAT/LE07/C01/T1')
.filterDate('2000-01-01', '2001-01-01');
我希望能够在OLS数据集上应用相同的过滤器:
var ols = ee.ImageCollection("NOAA/DMSP-OLS/CALIBRATED_LIGHTS_V4")
.filterDate('2000-01-01', '2001-01-01')
.select('stable_lights')
.clipToCollection(japan);
答案 0 :(得分:1)
您只是使用了错误的ImageCollection
ID。
如果您使用NOAA/DMSP-OLS/NIGHTTIME_LIGHTS
,则过滤器工作:
var ols = ee.ImageCollection("NOAA/DMSP-OLS/NIGHTTIME_LIGHTS")
.filterDate('2000-01-01', '2001-01-01')
.select('stable_lights')
print(ols)
// ImageCollection NOAA/DMSP-OLS/NIGHTTIME_LIGHTS (2 elements)
// type: ImageCollection
// id: NOAA/DMSP-OLS/NIGHTTIME_LIGHTS
// version: 1509484869949711
// bands: []
// features: List (2 elements)
// properties: Object (17 properties)