GEE | 基于Landsat的植被指数NDVI/EVI/LAI分析

职场   2025-01-03 00:03   陕西  

植被指数是生态监测和植被健康评估的重要工具,以下是三种常用指数及其公式:归一化植被指数 (NDVI)、增强型植被指数 (EVI)、以及叶面积指数 (LAI)。

一、归一化植被指数 (NDVI)

NDVI 是最常用的植被指数,通过近红外波段(B5)和红波段(B4)的反射率差异来衡量植被生长状况。其计算公式为:

其中,NIR 为近红外波段(B5),RED 为红波段(B4)。NDVI 值的范围是从 -1 到 1,值越高,代表植被覆盖越密集,生长状况越好。

二、增强型植被指数 (EVI)

EVI 是对 NDVI 的改进,旨在减少大气和背景噪声的影响,特别适用于高密度植被地区。其计算公式为:

其中,NIR 为近红外波段(B5),RED 为红波段(B4),BLUE 为蓝波段(B2)。EVI 通过加入蓝波段的校正因素,使其在高密度植被监测中更为精准。

三、叶面积指数 (LAI)

LAI 是衡量单位面积上植物叶片总面积的指标,常用于评估植物的生长状况。通过对 EVI 数据进行线性转换,可以获得 LAI:

该公式通过研究 DOI:10.1016/S0034-4257(01)00342-X 得到,用于转化 EVI 值为 LAI。

四、GEE代码

var geometry = ee.FeatureCollection('users/yusuhenhao/beijing');Map.centerObject(geometry, 5);
var time_start = ee.Date('2023-01-01');var time_end = ee.Date('2024-11-30');var interval = 8;
var maskClouds = function(image) { var mask = image.select('QA_PIXEL') .bitwiseAnd(1 << 4).eq(0) .and(image.select('QA_PIXEL').bitwiseAnd(1 << 3).eq(0)); return image.updateMask(mask).divide(10000) .select(['SR_B2', 'SR_B3', 'SR_B4', 'SR_B5', 'SR_B6', 'SR_B7'], ['B2', 'B3', 'B4', 'B5', 'B6', 'B7']) .copyProperties(image, ['system:time_start']);};
var landsat = ee.ImageCollection("LANDSAT/LC08/C02/T1_L2") .merge(ee.ImageCollection("LANDSAT/LC09/C02/T1_L2")) .filterDate(time_start, time_end) .filterBounds(geometry) .map(maskClouds);
var computeIndices = function(img) { var NDVI = img.normalizedDifference(['B5', 'B4']).rename('NDVI'); var EVI = img.expression( '2.5 * ((nir - red) / (nir + 6 * red - 7.5 * blue + 1))', { 'nir': img.select('B5'), 'red': img.select('B4'), 'blue': img.select('B2') }).rename('EVI'); var LAI = EVI.expression('3.618 * EVI - 0.118', {'EVI': EVI}).rename('LAI'); return img.addBands([NDVI, EVI, LAI]) .copyProperties(img, ['system:time_start']);};var indices = landsat.map(computeIndices);
var mosaic = ee.ImageCollection( ee.List.sequence(0, time_end.difference(time_start, 'day').subtract(1), interval) .map(function(days) { var start = time_start.advance(days, 'days'); return indices.filterDate(start, start.advance(interval, 'days')).max() .set('system:time_start', start.millis()); }));
Map.addLayer(mosaic.select('LAI').toBands().clip(geometry), {min: 0, max: 6}, 'LAI');
var plotTimeSeries = function(band, title, yLabel) { print(ui.Chart.image.series({ imageCollection: mosaic.select(band), region: geometry, reducer: ee.Reducer.mean(), scale: 1000, xProperty: 'system:time_start' }).setOptions({ title: title, hAxis: {title: 'Date'}, vAxis: {title: yLabel}, lineWidth: 2, pointSize: 4, legend: {position: 'none'}, chartArea: {backgroundColor: 'white', left: 80, top: 50, width: '70%', height: '60%'}, series: { 0: {color: 'black', pointSize: 4} }, backgroundColor: {fill: 'white', stroke: 'black', strokeWidth: 2}, vAxis: { gridlines: {color: 'black'}, baselineColor: 'black', textStyle: {color: 'black'}, titleTextStyle: {color: 'black'} }, hAxis: { gridlines: {color: 'black'}, baselineColor: 'black', textStyle: {color: 'black'}, titleTextStyle: {color: 'black'} } }));};
plotTimeSeries('NDVI', 'NDVI Time Series', 'NDVI');plotTimeSeries('EVI', 'EVI Time Series', 'EVI');plotTimeSeries('LAI''LAI Time Series''LAI');

五、成为会员

GIS遥感数据处理应用
会员:数据处理,ArcGIS/Python/MATLAB/R/GEE教学,指导作图和论文。
 最新文章