简介
植被状况指数(Vegetation Condition Index, VCI)
它是一种用于评估特定地区植被健康状况的指标。它通过衡量植被对特定时间段内的干旱或湿润条件的适应能力来反映植物的生态状况。VCI通常通过计算植被指数(NDVI或EVI)与其长期平均值之间的差异来计算,并进一步进行一些归一化处理。
VCI的计算可以使用以下公式:
VCI = (NDVI - NDVImin) / (NDVImax - NDVImin)
其中,NDVI是当前时期的植被指数,NDVImin和NDVImax分别是该地区长期气候条件下,植被指数的最小值和最大值。
通过VCI的计算,我们可以评估特定地区的植被健康状况。当VCI高于正常范围时,表示植被处于较好的状况,可以应对干旱或湿润条件。而当VCI低于正常范围时,表示植被可能受到干旱或湿润条件的影响,植物生长可能受到抑制,植被状况较差。
温度条件指数(Temperature Condition Index, TCI)
与VCI相对应的是温度条件指数(Temperature Condition Index, TCI)。TCI用于衡量植被对温度变化的适应能力。它可以通过计算地表温度与该地区长期平均地表温度之间的差异来评估。TCI的计算方式与VCI类似,可以使用以下公式:
TCI = (Tmax - Tmin) / (Tmax_max - Tmin_min)
其中,Tmax是当前时期的最高温度,Tmin是当前时期的最低温度,Tmax_max和Tmin_min分别是该地区长期气候条件下的最高温度和最低温度。
植被健康指数(Vegetation Health Index, VHI)
植被健康指数(Vegetation Health Index, VHI)是综合考虑VCI和TCI的指标。VHI通过将VCI和TCI进行加权平均来计算,以反映植被整体的健康状况。VHI可以使用以下公式计算:
VHI = (VCI + TCI) / 2
VHI的计算结果范围在0到1之间,其中0表示植被处于非常不健康的状态,1表示植被处于非常健康的状态。通过VHI的计算,我们可以更全面地评估特定地区植被的健康状况,从而进行适当的管理和保护措施。
VCI、TCI和VHI在农业、生态学、气象学等领域都有广泛应用。它们可以帮助我们及时了解植被的健康状况,预测和应对干旱或湿润条件的影响,从而优化农业生产和生态系统管理。此外,它们还可以用于监测和评估气候变化对植被生态系统的影响,为环境保护和气候适应提供参考。
作用
利用遥感影像计算植被状况指数(VCI)、温度条件指数(TCI)和植被健康指数(VHI)可以提供重要的信息和指导决策,在以下方面具有意义:
-
农业生产管理:VCI、TCI和VHI可以帮助农业决策者了解农田植被的健康状况和温度变化情况。通过监测VCI,农业决策者可以及时了解植物对干旱或湿润条件的适应能力,预测农作物产量和品质。TCI则可以提供关于温度变化的信息,有助于决策者优化农作物种植时间和管理策略。VHI综合考虑了植被和温度条件,可以提供更全面的农田植被和热量状态的评估,为农业管理提供指导。
-
气象灾害监测和预警:通过监测VCI、TCI和VHI,可以及时发现潜在的气象灾害风险。例如,当VCI和VHI较低时,可能表示植被面临干旱或病虫害风险;当TCI较高时,可能表示气温较高,农作物可能面临热害风险。基于这些指标,可以及早预警并采取相应的灾害管理措施,减少灾害的损失。
-
生态系统管理:VCI、TCI和VHI可以用于监测和评估自然和人工生态系统的健康状况。例如,在自然生态系统中,可以使用这些指标来评估植被对干旱或湿润条件的适应能力,预测生物多样性和生态系统功能的变化。在人工生态系统中,如森林管理和城市绿地管理中,可以通过计算这些指标来评估植被的生态状况、健康状况和生态系统服务能力。
-
气候变化研究:VCI、TCI和VHI可以用于监测和评估气候变化对植被和温度的影响。通过长期监测这些指标的变化,可以了解气候变化对生态系统的影响和生态系统对气候变化的响应。这对于评估和适应气候变化、制定环境政策和管理措施具有重要意义。
总的来说,利用遥感影像计算VCI、TCI和VHI可以为农业生产、气象灾害预警、生态系统管理和气候变化研究提供重要的信息和指导,有助于优化决策和保护生态环境。
函数
ee.ImageCollection.fromImages(images)
Returns the image collection containing the given images.
返回包含给定图像的图像集合。
Arguments:
images (List):
The images to include in the collection.
Returns: ImageCollection
ui.Chart.image.seriesByRegion(imageCollection, regions, reducer, band, scale, xProperty, seriesProperty)
Generates a Chart from an image collection. Extracts and plots the value of the specified band in each region for each image in the collection. Usually a time series.
-
X-axis = Image labeled by xProperty (default: 'system:time_start').
-
Y-axis = Reducer output.
-
Series = Region labeled by seriesProperty (default: 'system:index').
-
从图像集生成图表。提取并绘制图像集中每张图像每个区域的指定波段值。通常是时间序列。
X 轴 = xProperty(默认值:"system:time_start")标记的图像。
Y 轴 = 还原器输出。
系列 = 由 seriesProperty(默认值:'system:index')标记的区域。
Returns a chart.
Arguments:
imageCollection (ImageCollection):
An ImageCollection with data to be included in the chart.
regions (Feature|FeatureCollection|Geometry|List<Feature>|List<Geometry>):
The regions to reduce.
reducer (Reducer):
Reducer that generates the value for the y-axis. Must return a single value.
band (Number|String, optional):
The band name to reduce using the reducer. Defaults to the first band.
scale (Number, optional):
Scale to use with the reducer in meters.
xProperty (String, optional):
Property to be used as the label for each image on the x-axis. Defaults to 'system:time_start'.
seriesProperty (String, optional):
Property of features in opt_regions to be used for series labels. Defaults to 'system:index'.
Returns: ui.Chart
代码
//加载研究区
var geometry2 = /* color: #0b4a8b */ee.Geometry.Point([31.26883334786884, -28.54776015097778]),
geometry = ee.FeatureCollection("users/nqoehjiks98/Study_Area"),
imageVisParam = {"opacity":1,"bands":["VCI"],"max":100,"palette":["ff0000","ffff00","008000"]},
imageVisParam2 = {"opacity":1,"bands":["VCI"],"min":-1,"palette":["ff0000","ffff00","008000"]},
imageVisParam3 = {"opacity":1,"bands":["VCI"],"min":-1,"palette":["6fff16","f0ff12","ff5808"]},
imageVisParam4 = {"opacity":1,"bands":["VHI"],"palette":["ff0000","ffff00","008000"]},
Melmoth = ee.FeatureCollection("users/nqoehjiks98/Melmoth_Eucalyptus");
//添加 MODIS 植被指数 16-Day 全球 250m
var Coll_NDVI = ee.ImageCollection("MODIS/006/MOD13Q1")//MODIS/006/MOD13A1
var Coll_LST = ee.ImageCollection("MODIS/006/MOD11A2")//MODIS/006/MOD11A1
var startYear = 2018;
var endYear = 2019;
var startDate = ee.Date.fromYMD(startYear, 1, 1);
var endDate = ee.Date.fromYMD(endYear, 12, 31);
Coll_NDVI = Coll_NDVI.filterDate(startDate, endDate).select("NDVI");
Coll_NDVI = ee.ImageCollection(ee.Algorithms.If(Coll_NDVI.size().eq(0),
ee.ImageCollection(ee.Image(0).selfMask().rename('NDVI')),
Coll_NDVI
));
Coll_LST = Coll_LST.filterDate(startDate, endDate).select("LST_Day_1km");
Coll_LST = ee.ImageCollection(ee.Algorithms.If(Coll_LST.size().eq(0),
ee.ImageCollection(ee.Image(0).selfMask().rename('LST_Day_1km')),
Coll_LST
));
// MOD12Q1 数据的 NDVI 比例尺为 0.0001 [ 最小值 = -2000,最大值 = 10000] 。
var Coll_NDVI = Coll_NDVI.map(function(img) {
return img
.divide(10000).float().set("system:time_start", img.get("system:time_start")); // keep time info
});
var Coll_LST = Coll_LST.map(function(img) {
return img
.multiply(0.02).subtract(273.15).float().set("system:time_start", img.get("system:time_start")); // keep time info
});
print(Coll_NDVI);
print(Coll_LST);
// 创建每月的 NDVI 综合数据
var years = ee.List.sequence(startYear,endYear);
var months = ee.List.sequence(1,12);
//*********************************************************NDVI****************************************************//
var monthlyNDVI = ee.ImageCollection.fromImages(
years.map(function (y) {
return months.map(function(m) {
var monthly = Coll_NDVI
.filter(ee.Filter.calendarRange(y, y, "year"))
.filter(ee.Filter.calendarRange(m, m, "month"))
.mean();
return monthly
.set("year", y)
.set("month", m)
.set('date', ee.Date.fromYMD(y,m,1))
.set("system:time_start", ee.Date.fromYMD(y, m, 1));}); })
.flatten());
print('monthlyNDVI',monthlyNDVI)
//NDVI 最大值组成
var MonthlyMAX = ee.ImageCollection.fromImages(months
.map(function (m) {
var maxNDVI = monthlyNDVI.filter(ee.Filter.eq("month", m))
.reduce(ee.Reducer.percentile({percentiles: [90]}));
return maxNDVI
.set("month", m);})
.flatten());
//print (MonthlyMAX, 'MonthlyMAX');
Map.addLayer (MonthlyMAX.first().clip(geometry), {min:0, max:1, 'palette': ['red','yellow', 'green']}, 'MonthlyMAX');
//NDVI 最小值合成
var MonthlyMIN = ee.ImageCollection.fromImages(months
.map(function (m) {
var minNDVI = monthlyNDVI.filter(ee.Filter.eq("month", m))
.reduce(ee.Reducer.percentile({percentiles: [10]}));
return minNDVI
.set("month", m);})
.flatten());
//print (MonthlyMIN, 'MonthlyMIN');
Map.addLayer (MonthlyMIN.first().clip(geometry), {min:0, max:1, 'palette': ['red','yellow', 'green']}, 'MonthlyMIN');
//*********************************************************LST****************************************************//
var monthlyLST = ee.ImageCollection.fromImages(
years.map(function (y) {
return months.map(function(m) {
var monthly = Coll_LST
.filter(ee.Filter.calendarRange(y, y, "year"))
.filter(ee.Filter.calendarRange(m, m, "month"))
.mean();
return monthly
.set("year", y)
.set("month", m)
.set('date', ee.Date.fromYMD(y,m,1))
.set("system:time_start", ee.Date.fromYMD(y, m, 1));}); })
.flatten());
print('monthlyLST',monthlyLST)
//LST 最大值合成
var Monthly_LST_MAX = ee.ImageCollection.fromImages(months
.map(function (m) {
var maxNDVI = monthlyLST.filter(ee.Filter.eq("month", m))
.reduce(ee.Reducer.percentile({percentiles: [90]}));
return maxNDVI
.set("month", m);})
.flatten());
//print (Monthly_LST_MAX, 'Monthly_LST_MAX');
Map.addLayer (Monthly_LST_MAX.first().clip(geometry), {min:15, max:35, 'palette': ['red','yellow', 'green']}, 'Monthly_LST_MAX');
////LST 最小值合成
var Monthly_LST_MIN = ee.ImageCollection.fromImages(months
.map(function (m) {
var minNDVI = monthlyNDVI.filter(ee.Filter.eq("month", m))
.reduce(ee.Reducer.percentile({percentiles: [10]}));
return minNDVI
.set("month", m);})
.flatten());
//print (Monthly_LST_MIN, 'Monthly_LST_MIN');
Map.addLayer (Monthly_LST_MIN.first().clip(geometry), {min:0, max:1, 'palette': ['red','yellow', 'green']}, 'Monthly_LST_MIN');
//*********************************************************VCI****************************************************//
//Caluclo de VCI:植被状况指数(VCI)
// VCI - 我需要使用每月最大值和每月最小值
var VCI2 = monthlyNDVI.map(function(image) {
var img = image.select('NDVI').clip(geometry);
return image.addBands(image.expression(
"100*(NDVI-min)/(max-min)",{
"NDVI" : img,
"max" : ee.Image(MonthlyMAX.filter(ee.Filter.eq('month', image.get('month'))).first()),
"min" : ee.Image(MonthlyMIN.filter(ee.Filter.eq('month', image.get('month'))).first()),
})
.rename('VCI')).copyProperties(img,['system:time_start','system:time_end']);
});
//print(VCI2)
//Map.addLayer(VCI2)
//Map.centerObject(geometry)
var clipped_VCI = VCI2.mean().clip(geometry).select('VCI');
var VCI_Vis = {
min: 0.0,
max: 100.0,
palette: [
'red', 'yellow', 'green'],
};
Map.addLayer(clipped_VCI, VCI_Vis, 'VCI');
// 导出 VCI 图像
Export.image.toDrive({
image: clipped_VCI,
description: 'VCI',
scale: 250,
region: geometry
});
//*********************************************************TCI****************************************************//
//Calculo de TCI: 温度条件指数(TCI)
// TCI - 我需要使用每月最大值和每月最小值
var TCI2 = monthlyLST.map(function(image) {
var img = image.select('LST_Day_1km').clip(geometry);
return image.addBands(image.expression(
"100*(LST_Day_1km-min)/(max-min)",{
"LST_Day_1km" : img,
"max" : ee.Image(Monthly_LST_MAX.filter(ee.Filter.eq('month', image.get('month'))).first()),
"min" : ee.Image(Monthly_LST_MIN.filter(ee.Filter.eq('month', image.get('month'))).first()),
})
.rename('TCI')).copyProperties(img,['system:time_start','system:time_end']);
});
//print(TCI2)
//Map.addLayer(TCI2)
var clipped_TCI = TCI2.mean().clip(geometry).select('TCI');
var TCI_Vis = {
min: 0,
max: 100,
palette: [
'green', 'yellow', 'red'],
};
Map.addLayer(clipped_TCI, TCI_Vis, 'TCI');
// exporting TCI image
Export.image.toDrive({
image: clipped_TCI,
description: 'TCI',
scale: 250,
region: geometry
});
//*****************************************************VCI 和 TCI 图表********************************************//
var VCITimeSeries = ui.Chart.image.seriesByRegion(
VCI2, geometry2, ee.Reducer.mean(), 'VCI', 500, 'system:time_start', 'label')
.setChartType('ScatterChart')
.setOptions({trendlines: {0: {color: 'red'}},lineWidth: 1,pointSize: 3,
title: 'MODIS VCI Time Series',
vAxis: {title: 'VCI'},
series: {
0: {color: 'red'},
}});
// Display.
print(VCITimeSeries);
print(ui.Chart.image.series(VCI2 , geometry2 , ee.Reducer.mean(), 500));
var TCITimeSeries = ui.Chart.image.seriesByRegion(
TCI2, geometry2, ee.Reducer.mean(), 'TCI', 500, 'system:time_start', 'label')
.setChartType('ScatterChart')
.setOptions({trendlines: {0: {color: 'red'}},lineWidth: 1,pointSize: 3,
title: 'MODIS TCI Time Series',
vAxis: {title: 'TCI'},
series: {
0: {color: 'red'},
}});
// Display.
print(TCITimeSeries);
print(ui.Chart.image.series(TCI2 , geometry2 , ee.Reducer.mean(), 500));
//********************************************************Union Collection******************************************************//
var merg = VCI2.combine(TCI2);
print("Merge",merg)
//*********************************************************VHI****************************************************//
//植被健康指数(VHI)
// TCI - 我需要使用每月最大值和每月最小值
merg = merg.map(
function(img3) {
var vhi = img3.select('VCI')
.multiply(0.5)
.add((img3.select('TCI'))
.multiply(0.5))
.rename('VHI');
return img3.addBands(vhi);
}
);
var VHI = merg.select('VHI');
print(ui.Chart.image.series(VHI , geometry2 , ee.Reducer.mean(), 500));
var clipped_VHI = VHI.mean().clip(geometry).select('VHI');
var VHI_Vis = {
min: 70,
max: 75,
palette: [
'blue', 'green', 'violet'],
};
Map.addLayer(clipped_VHI, VHI_Vis, 'VHI');
// exporting VHII image
Export.image.toDrive({
image: clipped_VHI,
description: 'VHI',
scale: 250,
region: geometry
});
var VHITimeSeries = ui.Chart.image.seriesByRegion(
VHI, geometry2, ee.Reducer.mean(), 'VHI', 500, 'system:time_start', 'label')
.setChartType('ScatterChart')
.setOptions({trendlines: {0: {color: 'violet'}},lineWidth: 1,pointSize: 3,
title: 'MODIS VHI Time Series',
vAxis: {title: 'VHI'},
series: {
0: {color: 'red'},
}});
// Display.
print(VHITimeSeries);