1

I am trying to calculate Leaf Area Index in GEE by deriving LAI from NDVI (I found the formula in this thread from Research Gate forum https://www.researchgate.net/post/How_to_calculate_LAI_Leaf_Area_Index_from_Satellite_Images) and also I want to integrate it into a ui.DateSlider widget.

var sentinel_dataset = ee.ImageCollection("COPERNICUS/S2_SR")
 .filterDate(Start_period, End_period)

//Create NDVI
var collectionNDVI = sentinel_dataset.map(
    function(img) {
         return img.normalizedDifference(['B8','B4'])
               .rename('NDVI')
                  .copyProperties(img, ['system:time_start']);
                      });
                      
//Create LAI
var collectionLAI = sentinel_dataset.expression(
    '0.57 * exp(2.33 * NDVI)', {
      'NDVI': (collectionNDVI),
});

When I run this code, the console brings up this error: sentinel_dataset.expression is not a function

This is the link for my code https://code.earthengine.google.com/47d695de6faf894006516a447d095804 I tried multiple ways to write the expression but nothing seems to work. Is there another way to create LAI in this context?

1 Answer 1

1

There are two problems in your approach. First, you are working with an ImageCollection and if you want to calculate LAI for a collection you need to apply a function using map(function). The second problem, you need to apply the function to a collection that already has an NDVI band, so apply it to collectionNDVI instead of sentinel_dataset.

//Create LAI function
var addLAI = function(image) {
  var lai = ee.Image(0).expression(
    '0.57 * exp(2.33 * NDVI)',
    {
      'NDVI':image.select('NDVI')
    });
  return image.addBands(lai.rename('lai'));
};


// Apply to NDVIcollection
var collectionLAI = collectionNDVI.map(addLAI);

// Have a look at the results

Map.addLayer(collectionLAI, {bands:'lai', min:0, max:1,palette:['FFFFFF', 'CE7E45', 'DF923D', 'F1B555', 'FCD163', '99B718',
               '74A901', '66A000', '529400', '3E8601', '207401', '056201',
               '004C00', '023B01', '012E01', '011D01', '011301']}, 'lai');

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.