Springe direkt zu Inhalt

NBR - Landsat 8

Now, we are going to look at how to calculate the NBR using Landsat 8 data of the same area at the same time.

To do so, we will access the Landsat 8 Tier 1 Surface Reflectance dataset.

Preparing the data

The process is almost identical to that of Sentinel-2, however we will have to adjust the correct bands. Check the data documentation to find out which bands store which information and how to adress them.

// Compute Normalized Burn Ratio over LS8 product.
// NBR = (NIR - SWIR) / (NIR + SWIR), where
// SWIR is B7, 636-673 nm
// NIR is B5, 851-879 nm

//Step 1: Access your boundary-defining geometry
var extent_lebanon = ee.FeatureCollection("FAO/GAUL/2015/level0")
                  .filter(ee.Filter.eq('ADM0_NAME', 'Lebanon')); //filter for entry that equals the UN country name 'Lebanon'



//Step 2: Access the Landsat 8 Tier 1 Surface Reflectance data and filter it for all the the images of the year 2020 that lie within the geometries boundaries. Keep only the relevant bands and filter for cloud coverage.
var ls8 = ee.ImageCollection('LANDSAT/LC08/C01/T1_SR')
                  .filterBounds(extent_lebanon)
                  .filterDate('2020-07-01', '2020-07-31')
                  .select('B1','B2','B3','B4','B5','B6','B7')
                  .filter(ee.Filter.lt('CLOUD_COVER', 10));

//Print your ImageCollection to your console tab to inspect it
print(ls8, 'Image Collection Lebanon July 2020');
Map.centerObject(ls8,9)


//Step 3: Create a single Image by reducing by Median and clip it to the extent of the geometry
var ls8_median = ls8.median()
                    .clip(extent_lebanon);

//Print your Image to your console tab to inspect it
print(ls8_median, 'Median reduced Image Lebanon July 2020');

//Add your Image as a map layer
var visParams = {'min': 400,'max': [4000,3000,3000],   'bands':'B5,B4,B3'};
Map.addLayer(ls8_median, visParams, 'LS8 Lebanon July 2020 Median');

Calculating the NBR

//Step 4: Calculate the NBR manually: NBR = (B5 - B7) / (B5 + B7)
//This can be achieved using either simple band operations, .expression or .normalizedDifference
//Variant 1: Simple band operations
var nir = ls8_median.select('B5');
var swir = ls8_median.select('B7');
var nbr = nir.subtract(swir).divide(nir.add(swir)).rename('NBR');
print(nbr, 'NBR Lebanon July 2020 V1');

//Define special visualization parameters for the NBR and display the result.
var nbrParams = {min: -1, max: 1, palette: ['red', 'white', 'green']};
Map.addLayer(nbr, nbrParams, 'NBR Lebanon July 2020 V1');

//Variant 2: .expression
var nbr_2 = ls8_median.expression(
                      '(NIR-SWIR)/(NIR+SWIR)', {
                        'NIR' : ls8_median.select('B5'),
                        'SWIR' : ls8_median.select('B7')
                      })
                      .rename('NBR');

print(nbr_2, 'NBR Lebanon July 2020 V2');

//Display the result
Map.addLayer(nbr_2, nbrParams , 'NBR Lebanon July 2020 V2');

//Variant 3: .normalizedDifference(NIR, SWIR)
//Find out how .normalizedDifference works by checking Docs -> ee.Image -> normalizedDifference
var nbr_3 = ls8_median.normalizedDifference(['B5', 'B7'])
                      .rename('NBR');
print(nbr_3, 'NBR Lebanon July 2020 V3');

//Display the result
Map.addLayer(nbr_3, nbrParams, 'NBR Lebanon July 2020 V3');

Now that we have calculated and displayed the NBR in three different variants, we can again use the Inspector to see that the pixel values are always identical!


We can now compare the NDVI results of S2 and LS8. If you zoom in close enough, you can easily see how the spatial resolution of Sentinel-2 is superior to that of Landsat 8.