百里屠苏top  

1、数据集介绍

 

  •  Cloud Score+是一款用于中高分辨率光学卫星图像的质量评估(QA)处理器。
  • Cloud Score+ S2_HARMONIZED数据集是由协调后的Sentinel-2 L1C收集产生的。
  • Cloud Score+输出可用于识别相对清晰的像素,并有效地从L1C(TOA)L2A(SR)图像中去除云和云阴影。
  • Cloud Score+ S2_HARMONIZED数据集包括两个QA波段,cs和cs_cdf,它们都在0到1之间的连续尺度上对单个像素相对于表面可见性的可用性进行分级,其中0表示“不清楚”(遮挡),而1表示“清晰”(未遮挡)观测。
  • CS带根据观察像素与一个(理论的)清晰参考观测之间的光谱距离来计算QA值,而cs_cdf带则代表根据给定位置和时间的估计累积分布来确定一个观察像素是否清晰的可能性。换句话说,CS可以被看作是一种更即时的大气相似度评分(即:这个像素与一个完全清晰的参考图像之间的相似度如何),而cs_cdf则捕捉了对估计得分随时间变化的预期(即:如果我们有这个像素在所有时间点上的所有得分,这个得分会排在什么位置?)。
  • 云评分+ S2_HARMONIZED 集合中的图像具有与单个 Sentinel-2 L1C 集合相同的 ID 和系统:索引属性,因此可以根据共享的系统:索引将云评分+ 波段链接到源图像。
  • 目前正在对整个Sentinel-2档案进行Cloud Score+补录,随着新的结果不断添加到Cloud Score+集合中,将定期更新Dataset Availability日期。

2、代码示例

// Harmonized Sentinel-2 Level 2A collection.
var s2 = ee.ImageCollection('COPERNICUS/S2_SR_HARMONIZED');

// Cloud Score+ image collection. Note Cloud Score+ is produced from Sentinel-2
// Level 1C data and can be applied to either L1C or L2A collections.
var csPlus = ee.ImageCollection('GOOGLE/CLOUD_SCORE_PLUS/V1/S2_HARMONIZED');

// Region of interest.
var ROI = ee.Geometry.Point(-119.9087, 37.4159);

// Use 'cs' or 'cs_cdf', depending on your use case; see docs for guidance.
var QA_BAND = 'cs_cdf';

// The threshold for masking; values between 0.50 and 0.65 generally work well.
// Higher values will remove thin clouds, haze & cirrus shadows.
var CLEAR_THRESHOLD = 0.60;

// Make a clear median composite.
var composite = s2
    .filterBounds(ROI)
    .filterDate('2023-01-01', '2023-02-01')
    .linkCollection(csPlus, [QA_BAND])
    .map(function(img) {
      return img.updateMask(img.select(QA_BAND).gte(CLEAR_THRESHOLD));
    })
    .median();

// Sentinel-2 visualization parameters.
var s2Viz = {bands: ['B4', 'B3', 'B2'], min: 0, max: 2500};

Map.addLayer(composite, s2Viz, 'median composite');
Map.centerObject(ROI, 11);

 

posted on 2024-06-05 10:20  百里屠苏top  阅读(25)  评论(0编辑  收藏  举报