第十三章:探索图像集合
13.1 筛选和检查图像集合
我们将重点关注葡萄牙里斯本及其周边地区。下面,我们将定义一个位于城市中的点 lisbonPoint;访问非常大的 Landsat ImageCollection,并将其限制为 2020 年和包含 Lisbon 的影像;然后从生成的过滤 ImageCollection 中的每个图像中选择波段 6、5 和 4。
// Define a region of interest as a point in Lisbon, Portugal.
var lisbonPoint = ee.Geometry.Point(-9.179473, 38.763948);
// Center the map at that point.
Map.centerObject(lisbonPoint, 16);
// filter the large ImageCollection to be just images from 2020
// around Lisbon. From each image, select true-color bands to draw
var filteredIC = ee.ImageCollection('LANDSAT/LC08/C02/T1_TOA')
.filterDate('2020-01-01', '2021-01-01')
.filterBounds(lisbonPoint)
.select(['B6', 'B5', 'B4']);
// Add the filtered ImageCollection so that we can inspect values
// via the Inspector tool
Map.addLayer(filteredIC, {}, 'TOA image collection');
三个选定的波段(对应于 SWIR1、NIR 和 Red)显示假彩色图像,突出了里斯本不同土地覆盖(例如混凝土、植被)之间的差异。当 Inspector 选项卡高亮显示时,单击一个点将显示每张图像的波段 6、5 和 4 的值。如果打开 Series 选项,您将看到随时间变化的值。对于指定点和里斯本的所有其他点(因为它们都包含在同一个 Landsat 场景中),2020 年收集了 16 个影像。通过用手指沿着其中一条绘制的线(蓝色、黄色或红色)移动,您应该能够计算出这么多不同的值。沿线条移动鼠标将显示特定值和图像日期。
我们还可以使用 UI 自动显示此类图表。Chart 函数。以下代码片段应生成与我们在 Inspector 选项卡中观察到的图表相同的图表,假设单击了相同的像素。
// Construct a chart using values queried from image collection.
var chart = ui.Chart.image.series({ imageCollection: filteredIC,
region: lisbonPoint,
reducer: ee.Reducer.first(),
scale: 10 });
// Show the chart in the Console.
print(chart);

1560

被折叠的 条评论
为什么被折叠?



