GEE 裁剪 ImageCollection 图像:利用 feature 限制区域
在 Google Earth Engine 中,您可以使用 filterBounds() 函数来裁剪 ImageCollection 中的某个区域。以下是一个示例代码,演示如何利用该函数裁剪 ImageCollection 中的图像。
// 定义区域
var region = ee.Geometry.Rectangle([xmin, ymin, xmax, ymax]);
// 载入图像集合
var collection = ee.ImageCollection('LANDSAT/LC08/C01/T1_TOA')
.filterBounds(region);
// 打印图像集合
print(collection);
在上述代码中,region 变量定义了一个矩形区域,其中 xmin、ymin、xmax 和 ymax 是区域的边界坐标。然后,使用 filterBounds() 函数来过滤图像集合,只保留位于该区域内的图像。最后,使用 print() 函数打印裁剪后的图像集合。
请注意,xmin、ymin、xmax 和 ymax 的值应根据您的区域进行设置。另外,您还可以使用其他函数来定义区域,例如 ee.Geometry.Point()、ee.Geometry.Polygon() 等。
原文地址: https://www.cveoy.top/t/topic/fPzk 著作权归作者所有。请勿转载和采集!