NBR to capture of disturbance events
Step 1: get the collection and area of interest.
// get annual collection
var annualSRcollection = ee.ImageCollection("projects/servir-mekong/yearlyComposites")
// set the area of interest
var chl = ee.FeatureCollection("users/servirmekong/Vietnam/CHL_Boundary").geometry();
Step 2: add the function to calculate the nbr
// define function to calculate a spectral index to segment with LT
var nbr = function(img) {
var index = img.normalizedDifference(['nir', 'swir1'])
.select([0], ['NBR'])
.set('system:time_start', img.get('system:time_start'));
return img.addBands(index) ;
}
Step 3: apply the function to the image collection
var ltCollection = annualSRcollection.map(nbr)
Step 4: Display the results
/*
0.66 High-severity burn*/
Map.addLayer(y2010.clip(chl),{min:0,max:3000,bands:"red,green,blue"},"2010 rgb")
Map.addLayer(y2010.clip(chl),{min:-0.2,max:0.5,bands:"NBR",palette:"red,orange,yellow,green,darkgreen"},"2010 nbr")
Map.addLayer(y2010.clip(chl),{min:0,max:3000,bands:"red,green,blue"},"2017 rgb")
Map.addLayer(y2017.clip(chl),{min:-0.2,max:0.5,bands:"NBR",palette:"red,orange,yellow,green,darkgreen"},"2017 nbr")