GEE:快速了解如何使用GEE提 取WorldClim 数据集中的 MAT 和MAP。

       要从 WorldClim 数据集中提取 Mean Annual Temperature (MAT) 和 Mean Annual Precipitation (MAP) 数据,可使用 Google Earth Engine 中的以下代码:

// Load the WorldClim dataset.
var worldClim = ee.ImageCollection('WORLDCLIM/V1/BIO');

// Select the MAT and MAP bands.
var mat = worldClim.select('bio01'); // MAT
var map = worldClim.select('bio12'); // MAP

// Define a region of interest (ROI) to extract the data.
var roi = ee.Geometry.Point(-122.084, 37.42);

// Extract the data for the ROI.
var matValue = mat.reduceRegion({
  reducer: ee.Reducer.first(),
  geometry: roi,
  scale: 1000
});

var mapValue = map.reduceRegion({
  reducer: ee.Reducer.first(),
  geometry: roi,
  scale: 1000
});

// Print the extracted data.
print('MAT:', matValue);
print('MAP:', mapValue);

       这段代码中,我们首先加载了 WorldClim 数据集。然后,我们选择了 bio01 和 bio12 两个数据层分别代表 MAT 和 MAP。接下来,我们定义了一个感兴趣区域 (ROI),在这里我们选择了一个经纬度坐标 (-122.084, 37.42)。然后,我们使用 reduceRegion() 方法从数据集中提取了 ROI 内的MAT 和 MAP 数据。最后,我们将提取的数据打印出来。

      PS: 这只是一个简单的示例,您需要根据自己的需要调整代码,玩的开心!

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 1
    评论

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

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

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

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

余额充值