I am doing classification with Landsat 8 and other information to predict farm land use. I want to use monthly data(Monthly composite) rather than data from 2015-01-01' to '2016-12-22'. I think I should use ImageCollection.toArray() but i am not sure how to use it.

function maskL8sr(image) {
  // Bits 3 and 5 are cloud shadow and cloud, respectively.
  var cloudShadowBitMask = (1 << 3);
  var cloudsBitMask = (1 << 5);
  var snowBitMask = (1 << 4);
  var waterBitMask = (1 << 2);

  // 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(snowBitMask).eq(0);
return image.updateMask(mask);

var image = ee.Image(ee.ImageCollection('LANDSAT/LC08/C01/T1_SR')
    .filterDate('2015-01-01', '2016-12-22')
    .filter(ee.Filter.lte('CLOUD_COVER',20)) // filter on Cloud Cover
Map.addLayer(image, {bands: ['B4', 'B3', 'B2'],min:0, max: 3000}, 'ture  colour image');

A little bit of research on this forum (and the Google Earth Engine discussion forum) will get you further:

Getting weekly mean composite in Google Earth Engine?

reduce image collection to get annual monthly sum precipitation

| improve this answer | |

Your Answer

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

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