In this post, we will use the datasets from UMD (Tree Canopy Cover [TCC] and LOSS layers) to calculate and classify the dynamics of the forest. The TCC is available from 1988 and LOSS layers are available from 1989. Here we will be calculating different forest dynamics. Use the final assemblage using this link or use code for individual sections as described below.
- Stable Primary Forests:
- This is the area with TCC>=25%, and no disturbance is detected in the time-series.
var tcc = ee.ImageCollection('projects/servir-mekong/yearly_primitives_smoothed/tree_canopy'), mekong = ee.FeatureCollection('users/biplov/gadm-mekong'); var threshold = 25; var stablePrimaryForest = tcc.map(function (image) { return image.gte(threshold); }); stablePrimaryForest = stablePrimaryForest.sum().eq(ee.Number(tcc.size())); stablePrimaryForest = stablePrimaryForest.updateMask(stablePrimaryForest).clip(mekong); Map.addLayer(stablePrimaryForest, {min:0, max:1, palette: 'darkgreen'}, 'stable primary forest');
- Stable Other Forests:
This the area other than primary forest with TCC>=10%, and no disturbance detected in the time-series.
var tcc = ee.ImageCollection('projects/servir-mekong/yearly_primitives_smoothed/tree_canopy'), mekong = ee.FeatureCollection('users/biplov/gadm-mekong'); var upperThreshold = 25; var lowerThreshold = 10; var stableOtherForest = tcc.map(function (image) { return image.gte(lowerThreshold).and(image.lt(upperThreshold)); }); stableOtherForest = stableOtherForest.sum().eq(ee.Number(tcc.size())); stableOtherForest = stableOtherForest.updateMask(stableOtherForest).clip(mekong); Map.addLayer(stableOtherForest, {min:0, max:1, palette: 'orange'}, 'stable other forest');
- Stable non-forest Land:
This is the area which has never experienced any disturbance, and whose TCC<10.var tcc = ee.ImageCollection('projects/servir-mekong/yearly_primitives_smoothed/tree_canopy'), mekong = ee.FeatureCollection('users/biplov/gadm-mekong'); var threshold = 10; var stableNonForest = tcc.map(function (image) { // no disturbance detected return image.lt(threshold).and(image.gt(0)); }); stableNonForest = stableNonForest.sum().eq(ee.Number(tcc.size())); stableNonForest = stableNonForest.updateMask(stableNonForest).clip(mekong); Map.addLayer(stableNonForest, {min:0, max:1, palette: 'teal'}, 'stable non-forest');
- The area that was non-forest in 2000 and converted to the forest in 2018.
Here the non-forest is defined with TCC==0 and forest defined as TCC>=10%.
var tcc = ee.ImageCollection('projects/servir-mekong/yearly_primitives_smoothed/tree_canopy'), mekong = ee.FeatureCollection('users/biplov/gadm-mekong'); var nonForestYear = tcc.filterDate('2000-01-01', '2000-12-31').first(); nonForestYear = nonForestYear.eq(0); var forestYear = tcc.filterDate('2018-01-01', '2018-12-31').first(); forestYear = forestYear.gte(10); var gain = nonForestYear.and(forestYear); gain = gain.updateMask(gain.eq(1)).clip(mekong); Map.addLayer(gain, {min:0, max:1, palette: 'blue'}, 'gain');
- Forest area in 2018 that experienced at least one disturbance in the timeseries.
Here disturbance being TCC=0 or Loss=100 and forest area being TCC>=10%.
var tcc = ee.ImageCollection("projects/servir-mekong/yearly_primitives_smoothed/tree_canopy"), loss = ee.ImageCollection("projects/servir-mekong/yearly_primitives_smoothed/loss"), mekong = ee.FeatureCollection("users/biplov/gadm-mekong"); var forestYear = tcc.filterDate('2018-01-01', '2018-12-31').first(); forestYear = forestYear.gte(10); forestYear = forestYear.updateMask(forestYear); var years = ee.List.sequence(1990, 2017); var calculateDisturbances = function(year) { var thisYearStart = ee.Date.fromYMD(year,1,1); var thisYearEnd = ee.Date.fromYMD(year,12,31); var tccThisYear = ee.Image(tcc.filterDate(thisYearStart, thisYearEnd).first()); tccThisYear = tccThisYear.updateMask(forestYear.eq(1)); var lossThisYear = ee.Image(loss.filterDate(thisYearStart, thisYearEnd).first()); lossThisYear = lossThisYear.updateMask(forestYear.eq(1)); var disturbance = lossThisYear.eq(100).or(tccThisYear.eq(0)); return disturbance.updateMask(disturbance.eq(1)); }; var disturbances = ee.ImageCollection(years.map(calculateDisturbances)); disturbances = disturbances.sum().gt(0); var area = forestYear.and(disturbances); area = area.updateMask(area.eq(1)).clip(mekong); Map.addLayer(area, {min:0, max:1, palette: 'yellow'}, 'area');
Happy Earth Science 🙂
Leave a Reply