以下是我使用的代码,请帮我解决这个错误,以便我能够生成时间序列图。提前致谢!当我运行此代码时,我收到此错误“生成图表时出错:超出用户内存限制。”
var img = ee.ImageCollection("LANDSAT/LC08/C01/T1_SR"). filterBounds(tibet)
.filterDate('2019-01-01','2019-07-31')
Map.centerObject(tibet,5);
Map.addLayer(img,{bands:['B4','B3','B2'],min:0, max:3000, gamma:1.4}, 'raw');
var maskClouds = function(image) {
var pixel_qa = image.select('pixel_qa');
return image.updateMask(pixel_qa.eq(322))
};
print(maskClouds,'mask');
var img_masked = img.map(maskClouds);
Map.addLayer(img_masked,{bands:['B4','B3','B2'],min:0, max:3000, gamma:1.4}, 'no_cloud');
var getNDVI = function(img) {
return img.addBands(img.normalizedDifference(['B5','B4']).rename('NDVI'));
};
var img_ndvi = img_masked.map(getNDVI);
// print(img_ndvi,'img_ndvi0');
var composite = img_ndvi.qualityMosaic('NDVI').clip(tibet);
// Visualize NDVI
var ndviPalette = ['FFFFFF', 'CE7E45', 'DF923D', 'F1B555', 'FCD163', '99B718',
'74A901', '66A000', '529400', '3E8601', '207401', '056201',
'004C00', '023B01', '012E01', '011D01', '011301']
Map.addLayer(composite.select('NDVI'),{min:0, max: 1, palette: ndviPalette}, 'ndvi');
// visualize
var chart = ui.Chart.image.seriesByRegion(img_ndvi, tibet, ee.Reducer.mean(), 'NDVI',
250,'system:time_start', 'label');
print(chart);