GEE基础学习——EVI指数计算
【摘要】
利用表达式的形式计算EVI指数
// Compute Enhanced Vegetation Index (EVI) over the MODIS MOD09GA product
// using an expression.
// Load a MODIS image and apply the scaling factor.
v...
利用表达式的形式计算EVI指数
// 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影像图像!
文章来源: blog.csdn.net,作者:此星光明2021年博客之星云计算Top3,版权归原作者所有,如需转载,请联系作者。
原文链接:blog.csdn.net/qq_31988139/article/details/118515054
【版权声明】本文为华为云社区用户转载文章,如果您发现本社区中有涉嫌抄袭的内容,欢迎发送邮件进行举报,并提供相关证据,一经查实,本社区将立刻删除涉嫌侵权内容,举报邮箱:
cloudbbs@huaweicloud.com
- 点赞
- 收藏
- 关注作者
评论(0)