加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
文件
克隆/下载
Fitlered_Composite.js 769 Bytes
一键复制 编辑 原始数据 按行查看 历史
Shaun Levick 提交于 2019-03-12 08:56 . RS_lab1
// Filter an image collection by date and region to make a
// median pixel composite.
//
// See also: ClippedComposite, which crops the output image
// instead of filtering the input collection.
// Filter to only include images intersecting Colorado or Utah.
// Create a Landsat 8 composite for 2016, and filter by
// the bounds of the FeatureCollection.
var collection = ee.ImageCollection('LANDSAT/LC08/C01/T1_TOA')
.filterDate('2016-01-01', '2016-12-31')
.filterBounds(polygon);
print(collection)
// Compute the median in each band, in each pixel.
var median = collection.median();
// Select the red, green and blue bands.
var result = median.select('B4', 'B3', 'B2');
Map.addLayer(result, {max:0.4}, 'Landsat 8 Composite');
Map.setCenter(-47, -15, 7);
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化