前往小程序,Get更优阅读体验!
立即前往
首页
学习
活动
专区
工具
TVP
发布
社区首页 >专栏 >GEE基础学习——EVI指数计算

GEE基础学习——EVI指数计算

作者头像
此星光明
发布2024-02-01 19:45:14
2490
发布2024-02-01 19:45:14
举报

利用表达式的形式计算EVI指数

代码语言:javascript
复制
// Compute Enhanced Vegetation Index (EVI) over the MODIS MOD09GA product
// using an expression.

// Load a MODIS image and apply the scaling factor.
var img = ee.Image('MODIS/006/MOD09GA/2012_03_09').multiply(0.0001);

// Compute EVI using an expression.  The second argument is a map from
// variable name to band name in the input image.
var evi = img.expression(
    '2.5 * (nir - red) / (nir + 6 * red - 7.5 * blue + 1)',
    {
        red: img.select('sur_refl_b01'),    // 620-670nm, RED
        nir: img.select('sur_refl_b02'),    // 841-876nm, NIR
        blue: img.select('sur_refl_b03')    // 459-479nm, BLUE
    });

// Center the map.
Map.setCenter(-94.84497, 39.01918, 8);

// Display the input image and the EVI computed from it.
Map.addLayer(img.select(['sur_refl_b01', 'sur_refl_b04', 'sur_refl_b03']),
         {min: 0, max: 0.2}, 'MODIS bands 1/4/3');
Map.addLayer(evi, {min: 0, max: 1}, 'EVI');

以上这段代码的核心是img.expression('表达式',{公式中的波段名称:要选择影像的波段}...)有几个波段参与运算就通过这个形式及逆行计算即可。

这是参与运算的后的EVI灰度影像展示

这是原始的MODIS影像图像!

本文参与 腾讯云自媒体同步曝光计划,分享自作者个人站点/博客。
原始发表:2024-02-01,如有侵权请联系 cloudcommunity@tencent.com 删除

本文分享自 作者个人站点/博客 前往查看

如有侵权,请联系 cloudcommunity@tencent.com 删除。

本文参与 腾讯云自媒体同步曝光计划  ,欢迎热爱写作的你一起参与!

评论
登录后参与评论
0 条评论
热度
最新
推荐阅读
领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档