分别三个图像,一个是波段1-7的一个值,一个是按照时序进行看的每一年的B1波段值,最后一个图是三个区域的B1值,很好的阐述了你想表达的时序图,波段图和三个不同该区域的B1波段值。
关键是充分理解:
ui.Chart.image.doySeries(影像集合,多个波段或者一个波段,研究区域)
ui.Chart.image.doySeriesByYear(影像集合,影像集合某一个波段,影像一个区域)
ui.Chart.image.doySeriesByRegion(影像集合,影像集合某一个波段,选定的多个研究区)
三个方法的使用,你需要那个就直接套用哪个
代码如下:
// Generate day-of-year charts from Landsat 8 images. var city = ee.Feature( // San Francisco. ee.Geometry.Rectangle(-122.42, 37.78, -122.4, 37.8), {label: 'City'}); var forest = ee.Feature( // Tahoe National Forest. ee.Geometry.Rectangle(-121, 39.4, -120.99, 39.45), {label: 'Forest'}); var desert = ee.Feature( // Black Rock Desert. ee.Geometry.Rectangle(-119.02, 40.95, -119, 41), {label: 'Desert'}); var westernRegions = new ee.FeatureCollection([city, forest, desert]); var landsat8Toa = ee.ImageCollection('LANDSAT/LC08/C01/T1_TOA') .filterBounds(westernRegions); landsat8Toa = landsat8Toa.select('B[1-7]'); // Create a chart using a sequence of arguments. var bands = ui.Chart.image.doySeries(landsat8Toa, forest, null, 200); print(bands); // Create a chart using a dictionary of named arguments. var years = ui.Chart.image.doySeriesByYear({ imageCollection: landsat8Toa, bandName: 'B1', region: forest, scale: 200 }); print(years); var regions = ui.Chart.image.doySeriesByRegion({ imageCollection: landsat8Toa, bandName: 'B1', regions: westernRegions, scale: 500, seriesProperty: 'label' }); print(regions); Map.addLayer(westernRegions); Map.setCenter(-121, 39.4, 6);