GEE20:获取地面站点的遥感图层的采样值

1. 介绍

  去年由于实验需要,想通过GEE获取遥感图层的采样值,但是多次尝试后任无法实现。最近通过查询,终于找到的获取采样点的方法,现在将其记录在此,并与大家分享。
在这里插入图片描述

2. GEE实现

  首先是需要导入你的采样点的文件,其中主要包括了经纬度。
  接下来,就可以通过导入的采样点进行数据提取了,在这里主要是提取2022年逐月的地表温度值(LST)。

2.1 数据介绍

地表温度LST:
  The MOD21C2 dataset is an 8-day composite LST product that uses an algorithm based on a simple averaging method. The algorithm calculates the average from all the cloud free MOD21A1D and MOD21A1N daily acquisitions from the 8-day period. Unlike the MOD21A1 data sets where the daytime and nighttime acquisitions are separate products, the MOD21A2 contains both daytime and nighttime acquisitions. The LST, Quality Control (QC), view zenith angle, and viewing time have separate day and night bands, while the values for the MODIS emissivity bands 29, 31, and 32 are the average of both the nighttime and daytime acquisitions.

在这里插入图片描述

地表覆盖图:
  The European Space Agency (ESA) WorldCover 10 m 2020 product provides a global land cover map for 2020 at 10 m resolution based on Sentinel-1 and Sentinel-2 data. The WorldCover product comes with 11 land cover classes and has been generated in the framework of the ESA WorldCover project, part of the 5th Earth Observation Envelope Programme (EOEP-5) of the European Space Agency.

在这里插入图片描述

地形图:
  The Shuttle Radar Topography Mission (SRTM) digital elevation dataset was originally produced to provide consistent, high-quality elevation data at near global scope. This version of the SRTM digital elevation data has been processed to fill data voids, and to facilitate its ease of use.

在这里插入图片描述

2.2 GEE code

var roi = 
    ee.Geometry.Polygon(
        [[[105.13836035633825, 32.02577928909809],
          [105.13836035633825, 28.49669989421675],
          [110.22503027821325, 28.49669989421675],
          [110.22503027821325, 32.02577928909809]]], null, false);
var roi_bound = ee.Image().toByte()
                  .paint({featureCollection: ee.FeatureCollection(roi), color:0, width: 3});
Map.addLayer(roi_bound, {palette: "black"}, 'roi boundary');

var points = ee.FeatureCollection("projects/ee-ypzh736/assets/points")
                .aside(print) // 导入本地上传的站点信息
                .map(function(fea){
                  return ee.Feature(ee.Geometry.Point([fea.get('LON'),fea.get('LAT')]))//设置经纬度
                           .copyProperties(fea)//拷贝原有属性信息
                }).aside(print)

Map.centerObject(points)
Map.addLayer(points.style({color:'red',pointSize:5}),{},'randomPoints')

// --------------------------------------
// 获取2022年1-12月逐月LST数据
var originDate = ee.Date('2022-01-01')
var advance_list = ee.List.sequence(0, 11, 1)
var LST_list = advance_list.map(function(adv){
  var startDate = originDate.advance(adv,'month');//当前的开始日
  var endDate = startDate.advance(3,'month');//当前的结束日
  return  ee.ImageCollection("MODIS/061/MOD21C2")//地表温度数据
                  .filterDate(startDate,endDate)//时间过滤
                  .select('LST_Day')//日间平均地温
                  .mean()
                  .clip(roi);
                   
})//.aside(print)  

var imageLayers =  ee.Image(ee.ImageCollection("ESA/WorldCover/v100").first()) //地表覆盖度图
                      .addBands(ee.Image('CGIAR/SRTM90_V4').select('elevation'))//高程数据
                      .rename(['LandCover','DEM'])// 波段重命名
                      .addBands(ee.ImageCollection.fromImages(LST_list).toBands())//将逐月LST数据转为波段
                      //.aside(print)

// -----------------------------------
var sample_points = imageLayers.sampleRegions({
  collection: points,
  scale:20,//A nominal scale in meters of the projection to sample in. If unspecified,the scale of the image's first band is used.
  geometries:true //注意,这个geometries属性要加上,如果不加上,结果不会有地理坐标
})
print('sample_points',sample_points)

// 导出数据至Google drive
Export.table.toDrive({
    collection: sample_points,
    description: 'sample_points_LST',
    fileFormat: 'CSV',
    folder: "LUCC"
  });

结果展示(共计100个点):

在这里插入图片描述
在这里插入图片描述
在这里插入图片描述
数据展示:
在这里插入图片描述

完整代码链接: https://code.earthengine.google.com/2b9958563b3101efd8cee2c4829c79cd

3.参考

  • 2
    点赞
  • 4
    收藏
    觉得还不错? 一键收藏
  • 打赏
    打赏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包

打赏作者

Jackson的生态模型

你的鼓励将是我创作的最大动力

¥1 ¥2 ¥4 ¥6 ¥10 ¥20
扫码支付:¥1
获取中
扫码支付

您的余额不足,请更换扫码支付或充值

打赏作者

实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值