0

I want to create a composite with the dryes pixels of an ImageCollection. I know how to make a greenest pixel composite, but I have no clue how to make a dryest pixel composite.

Is there a function similar to ee.ImageCollection.qualityMosaic(qualityBand), but for the dryest pixel?

Code for greenest:

var collection = ee.ImageCollection("LANDSAT/LC08/C01/T1_TOA");
var filtered = collection.filterDate('2015-04-01', '2015-07-01');

// Greenest Pixel Composite
function addNDVI(input) {
 var ndvi = input.normalizedDifference(['B5', 'B4']);
 return input.addBands(ndvi);
}

var with_ndvi = filtered.map(addNDVI);
var greenest = with_ndvi.qualityMosaic('nd');
Map.addLayer(greenest, {max:0.3, bands:["B4", "B3", "B2"]}, 'RGB');
  • 1
    I guess the function to use will be exactly the same, you will simply pass another band. So maybe the question is rather, which are good measures of dryness? Maybe you could look at a NDWI-based measures? – Matifou Jun 27 '18 at 0:24
  • 1
    This makes sense. Could the BSI (Bare Soil Index) work? – loloj0 Jun 27 '18 at 8:44

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.