Google Earth Engine(GEE)——Sentinel-2数据去云操作
Sentinel
alibaba/Sentinel: Sentinel 是阿里巴巴开源的一款面向分布式服务架构的流量控制、熔断降级组件,提供实时监控、限流、降级和系统保护功能,适用于微服务治理场景。
项目地址:https://gitcode.com/gh_mirrors/sentine/Sentinel
·
Sentinel-2数据目前在GEE中共有两种产品:一种是普通的没有经过大气校正的数据;另一种是经过大气校正后的数据(不全)。这两种数据去云的操作方法都是通过QA波段来完成的。
代码
var roi = /* color: #0b4a8b */ee.Geometry.Polygon(
[[[115.22447911987308, 38.97207826950874],
[117.64147130737308, 39.07450027191289],
[117.55358068237308, 40.67633196985795],
[114.91686193237308, 40.576272152256934]]]);
Map.centerObject(roi, 7);
//利用Sentinel-2自带的质量波段QA60通过按位运算去除云或阴影
function rmCloud(image) {
var qa = image.select('QA60');
var cloudBitMask = 1 << 10;
var cirrusBitMask = 1 << 11;
var mask = qa.bitwiseAnd(cloudBitMask).eq(0)
.and(qa.bitwiseAnd(cirrusBitMask).eq(0));
return image.updateMask(mask);
}
var rawImage = ee.Image("COPERNICUS/S2/20180118T031039_20180118T031037_T50SMJ");
var visParams = {
bands: ['B4', 'B3', 'B2'],
min: 0,
max: 3000
};
print("rawImage", rawImage);
Map.addLayer(rawImage, visParams, "rawImage");
var cleanImage = rmCloud(rawImage);
print("cleanImage", cleanImage);
Map.addLayer(cleanImage, visParams, "cleanImage");
结果

alibaba/Sentinel: Sentinel 是阿里巴巴开源的一款面向分布式服务架构的流量控制、熔断降级组件,提供实时监控、限流、降级和系统保护功能,适用于微服务治理场景。
最近提交(Master分支:4 个月前 )
222670e6
* fix: Endpoint#toString host formatting; add Endpoint unit test
* test: remove empty EndpointTest.java (fix accidental PR changes)
---------
Signed-off-by: 赖尧 <yujitang_2006@qq.com> 28 天前
e7a9c560
* chore: remove node_modules from git & add to .gitignore
* fix(docs): normalize README table style (MD060) across adapters and cluster modules
* docs: fix compact table style in parameter flow README
* docs: fix markdownlint MD009 and MD060 in README files
* docs: fix table format in parameter-flow-control README (MD060/MD009)
* docs: fix table format in spring-webmvc README files (MD060/MD009)
* fix: restore UTF-8 encoding and fix markdownlint errors
* fix: wrap remaining bare URLs with angle brackets (MD034)
* fix: remove trailing spaces from table rows (MD009)
---------
Signed-off-by: 赖尧 <yujitang_2006@qq.com> 1 个月前
AtomGit 是由开放原子开源基金会联合 CSDN 等生态伙伴共同推出的新一代开源与人工智能协作平台。平台坚持“开放、中立、公益”的理念,把代码托管、模型共享、数据集托管、智能体开发体验和算力服务整合在一起,为开发者提供从开发、训练到部署的一站式体验。
更多推荐


所有评论(0)