GEE | 基于Landsat的1984-2024年归一化燃烧指数NBR分析

职场   2025-01-29 13:30   上海  
各位同学,新年好!今天和大家分享的是1984-2024年归一化燃烧指数NBR,需要的同学仅需要更改研究区即可。
一、归一化燃烧指数
归一化燃烧指数(Normalized Burn Ratio, NBR)是通过近红外(NIR)和短波红外(SWIR)波段的反射率计算得出的。NBR的值范围在-1到1之间,通常用于评估火灾前后的植被变化。火灾后,NBR值会显著下降,随着时间的推移,植被恢复,NBR值会逐渐回升。
二、GEE代码
基于Landsat NBR年数据,print每年的NBR均值并导出栅格数据。
var geometry = table;Map.centerObject(geometry, 6);
var dataset = ee.ImageCollection("LANDSAT/COMPOSITES/C02/T1_L2_ANNUAL_NBR")
var startYear = 1984;var endYear = 2024;var years = ee.List.sequence(startYear, endYear);
var annualMeanNBR = years.map(function(year) { year = ee.Number(year); var startDate = ee.Date.fromYMD(year, 1, 1); var endDate = ee.Date.fromYMD(year, 12, 31);
var meanNBR = dataset .filterDate(startDate, endDate) .select('NBR') .mean() .reduceRegion({ reducer: ee.Reducer.mean(), geometry: geometry, scale: 1000, maxPixels: 1e13 }) .get('NBR');
return ee.Feature(null, { year: year, meanNBR: meanNBR });});
var annualMeanNBRCollection = ee.FeatureCollection(annualMeanNBR);
print('Annual Mean NBR:', annualMeanNBRCollection);
var chart = ui.Chart.feature.byFeature({ features: annualMeanNBRCollection, xProperty: 'year', yProperties: ['meanNBR']}).setChartType('LineChart').setOptions({ title: 'Annual Mean NBR (1984-2024)', hAxis: { title: 'Year' }, vAxis: { title: 'Mean NBR' }, lineWidth: 2, pointSize: 4});print(chart);
Export.table.toDrive({ collection: annualMeanNBRCollection, description: 'AnnualMeanNBR', fileFormat: 'CSV', folder: 'NBR_Exports'});
years.getInfo().forEach(function(year) { var startDate = year + '-01-01'; var endDate = year + '-12-31'; var yearCollection = dataset .filterDate(startDate, endDate) .select('NBR') .mean() .clip(geometry); Export.image.toDrive({ image: yearCollection, description: 'NBR_' + year, fileNamePrefix: 'NBR_' + year, scale: 100, region: geometry, maxPixels: 1e13, crs: "EPSG:4326", folder: 'NBR_Exports' });});
三、成为会员

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