0

My aim is to compose cloud free maximum-value NDVI-composite from Svalbard, Norway. Composite is based surface reflectance collection, filtered with dates (growth period) and region of interest. When I run the script bulk of vegetated shore and river valley areas receive saturated NDVI values of 1. These values do not seem feasible.

This problem does not occur with TOA -collection. Aim would be to compose one maximum-value composite per year. These composites I would use in time-series analysis. I have understood that time-series analysis of vegetation indices, should be carried out preferably with atmospherically corrected data.

Is there a fix for this problem or am I forced to use TOA -collection for my time-series analysis?

var AOI = /* color: #ff0000 */ee.Geometry.LinearRing(
    [[15.613606350113514, 78.84406218820766],
     [14.251301662613514, 78.78866033745591],
     [12.888996975113514, 78.2351821033567],
     [13.669026271988514, 78.01590681296484],
     [16.404621975113514, 78.11586662087933],
     [17.766926662613514, 78.41966556904141],
     [16.899006740738514, 78.70719949833222],
     [15.613606350113514, 78.84406218820766]]),
centre = /* color: #0b4a8b */ee.Geometry.Point([15.168660061051014, 78.3953809339629]);

//Creating cloudmask
function cloudMask(image) {
// Bits 3 and 5 are cloud shadow and cloud, respectively.
 var cloudShadowBitMask = (1 << 3);
 var cloudsBitMask = (1 << 5);
// Get the pixel QA band.
 var qa = image.select('pixel_qa');
// Both flags should be set to zero, indicating clear conditions.
 var mask = qa.bitwiseAnd(cloudShadowBitMask).eq(0)
             .and(qa.bitwiseAnd(cloudsBitMask).eq(0));
              return image.updateMask(mask);
}

//data collection
var L8 = ee.ImageCollection("LANDSAT/LC08/C01/T1_SR")
              .filterDate('2018-06-01', '2018-08-31')
              .filterBounds(AOI)
              .map(cloudMask);

//add ndvi values to data collection
var addNDVI = function(image) {
  var ndvi = image.normalizedDifference(['B5', 'B4']).rename('NDVI');
  return image.addBands(ndvi);
};

// maximum NDVI values mosaic
var dataNDVI = L8.map(addNDVI);
var maxNDVI18 = dataNDVI.qualityMosaic('NDVI');

// Colorpalette

var ndviPalette = ['FFFFFF', 'CE7E45', 'DF923D', 'F1B555', 'FCD163', '99B718',
  '74A901', '66A000', '529400', '3E8601', '207401', '056201',
  '004C00', '023B01', '012E01', '011D01', '011301'];

//Vizualize maxNDVI and peatcore sites
Map.centerObject(centre, 6);
Map.addLayer(maxNDVI18.select('NDVI'),
        {min:-1, max: 1, palette: ndviPalette}, 'ndvi');

Link to script: https://code.earthengine.google.com/31b5e41290b29ea5f31bc95d359a7b6d

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.