> 文档中心 > Google Earth Engine(GEE)——月度降水和ndvi植被覆盖度相关性分析(墨西哥为例)

Google Earth Engine(GEE)——月度降水和ndvi植被覆盖度相关性分析(墨西哥为例)

利用哨兵数据SR数据进行相关性分析,本文先通过降水数据和S2计算的NDVI植被覆盖度,然后分别进行筛选,通过影像合并得到逐月的影像集合合成,然后筛选出降水和ndvi影像,分别计算计算相关性

ee.ImageCollection.fromImages(images)

Returns the image collection containing the given images.

Arguments:

images(List):

The images to include in the collection.

Returns:ImageCollection

代码:

//矢量边界var table = ee.FeatureCollection("projects/essential-rider-326809/assets/mexico");var geometry=table.geometry();Map.centerObject(geometry, 10)//哨兵数据加载var s2 = ee.ImageCollection("COPERNICUS/S2_SR");//影像色彩参数var rgbVis = {  min: 0.0,  max: 3000,  bands: ['B4', 'B3', 'B2'],};// Sentinel-2 SR 影像去云和去雪的函数function maskCloudAndShadowsSR(image) {  var cloudProb = image.select('MSK_CLDPRB');  var snowProb = image.select(&