
- 数据集可用性
- 2015-06-27T00:00:00Z–2025-03-09T06:16:29Z
- 数据集提供程序
- 欧洲联盟/欧洲航天局/哥白尼/SentinelHub
- Earth Engine 代码段
-
ee.ImageCollection("COPERNICUS/S2_CLOUD_PROBABILITY")
- 重新访问间隔
- 5 天
- 标签
S2 云概率是使用 sentinel2-cloud-detector 库(使用 LightGBM)创建的。在应用梯度提升基准算法之前,所有波段均使用双线性插值法上采样到 10 米分辨率。生成的 0..1
浮点概率会缩放为 0..100
,并存储为 UINT8。缺少任一或所有波段的区域会被遮盖。
值越高,更有可能是云或高反射率表面(例如屋顶或雪)。
Sentinel-2 是一项宽幅高分辨率多光谱成像任务,可支持哥白尼陆地监测研究,包括监测植被、土壤和水域覆盖率,以及观察内陆水道和沿海地区。
您可以在集合 COPERNICUS/S2_SR_HARMONIZED 中找到第 2 级数据。您可以在集合 COPERNICUS/S2_HARMONIZED 中找到第 1 级数据。这些合集中的素材资源提供额外的元数据。
请参阅此教程,了解如何应用云层遮罩。
乐队
名称 | 最小值 | 最大值 | 像素尺寸 | 说明 |
---|---|---|---|---|
probability |
0 | 100 | 10 米 | 像素是多云的概率。 |
使用条款
使用 Sentinel 数据须遵守 哥白尼计划 Sentinel 数据条款及条件。
使用 Earth Engine 进行探索
var s2Sr = ee.ImageCollection('COPERNICUS/S2_SR_HARMONIZED'); var s2Clouds = ee.ImageCollection('COPERNICUS/S2_CLOUD_PROBABILITY'); var START_DATE = ee.Date('2019-01-01'); var END_DATE = ee.Date('2019-03-01'); var MAX_CLOUD_PROBABILITY = 65; var region = ee.Geometry.Rectangle({coords: [-76.5, 2.0, -74, 4.0], geodesic: false}); Map.setCenter(-75, 3, 12); function maskClouds(img) { var clouds = ee.Image(img.get('cloud_mask')).select('probability'); var isNotCloud = clouds.lt(MAX_CLOUD_PROBABILITY); return img.updateMask(isNotCloud); } // The masks for the 10m bands sometimes do not exclude bad data at // scene edges, so we apply masks from the 20m and 60m bands as well. // Example asset that needs this operation: // COPERNICUS/S2_CLOUD_PROBABILITY/20190301T000239_20190301T000238_T55GDP function maskEdges(s2_img) { return s2_img.updateMask( s2_img.select('B8A').mask().updateMask(s2_img.select('B9').mask())); } // Filter input collections by desired data range and region. var criteria = ee.Filter.and( ee.Filter.bounds(region), ee.Filter.date(START_DATE, END_DATE)); s2Sr = s2Sr.filter(criteria).map(maskEdges); s2Clouds = s2Clouds.filter(criteria); // Join S2 SR with cloud probability dataset to add cloud mask. var s2SrWithCloudMask = ee.Join.saveFirst('cloud_mask').apply({ primary: s2Sr, secondary: s2Clouds, condition: ee.Filter.equals({leftField: 'system:index', rightField: 'system:index'}) }); var s2CloudMasked = ee.ImageCollection(s2SrWithCloudMask).map(maskClouds).median(); var rgbVis = {min: 0, max: 3000, bands: ['B4', 'B3', 'B2']}; Map.addLayer( s2CloudMasked, rgbVis, 'S2 SR masked at ' + MAX_CLOUD_PROBABILITY + '%', true);