I'm trying to export Surface Reflectance data from Landsat 7 through Google Earth Engine. However, the dimensions don't seem to match up: previously with NVDI data, I printed the image collection size divided by the number of snapshots, temporal resolution of 8 days, per year to check that it had 16 years worth of data.

imgcoll = ee.ImageCollection('LANDSAT/LE07/C01/T1_8DAY_NDVI') \

imgcoll.size().getInfo() / 46

Trying to print the image collection size of Surface Reflectance data yields a confusing result. The wikipedia page on Landsat 7 indicates a temporal resolution of 16 days, which should mean that when dividing by 23, the result should be 16 years (2003-2018) as well.

imgcoll = ee.ImageCollection('LANDSAT/LE07/C01/T1_SR') \

imgcoll.size().getInfo() / 23

Why is that the case, and what is the proper way of exporting Landsat 7 Surface Reflectance data? In addition, has the Landsat 7 dataset from Google Earth Engine been corrected for the SLC failure? This was not a problem encountered with exporting MODIS data.

2 Answers 2


The NDVI product is a 8-day global composite product which means that the scenes from within a period of 8 days is combined into one image. But for SR product, the 16 day resolution means the periodicity of observation in the same location by the constellation. Therefore in a single day there are multiple scenes.

The proper way to export Landsat 7 SR data is to simply export the image you want to, but you might want to filter the collection using filterBounds so that you are only working with images in your region. If you want to export the whole collection, you can check out this query by another user.

I don't believe the SR products have been corrected for SLC failure.

  • Is there a way to flatten the Landsat 7 data to the 16 day periods such that when exported, the image collection size would be 23?
    – Sentient
    Commented Jul 8, 2019 at 23:56
  • In more technical terms, how would you create 16 day temporal composites for Landsat 7 through Earth Engine? There seems to be 1 year composites but not ones for the temporal resolution. MODIS had 8 day composites for its 8 day temporal resolution so I'm wondering if there's something similar.
    – Sentient
    Commented Jul 9, 2019 at 0:27

Working off another solution, "Getting 16 days composite in Google Earth Engine?", I was able to create 16 days composites for Landsat 7 which match its temporal resolution of 16 days. The code below does not include corrections for the SLC failure or additional functions such as cloud masking; but it's easily amendable by modifying the landsat dataset before it's composited.

// Get Landsat 7 dataset.
var landsat = ee.ImageCollection('LANDSAT/LE07/C01/T1_SR');
// Set the sequence of years where we want our 16 days composite from.
var years   = ee.List.sequence(2003, 2018);

// Function to get composites for a year.
var composites = function(year) {

  // Set composite period to be 16 days.
  var interval = 16;

  // Get sequence of composite periods.
  var sequence = ee.List.sequence(0, ee.Number(365 / interval).ceil().subtract(1));

  // Set initial date where compositing begins: here is first day of the year.
  var initdate = ee.Date.fromYMD(year, 1, 1);

  // Apply this function over all composite periods.
  return ee.ImageCollection(sequence.map(function(i) {

    // Get the start date of the current sequence relative to given start date.
    var startDate = initdate.advance(
      ee.Number(interval).multiply(i)                  , 'day');

    // Get the close date of the current sequence relative to given start date.
    var closeDate = initdate.advance(
      ee.Number(interval).multiply(ee.Number(i).add(1)), 'day');

    // Get the filtered Landsat image collection.
    return landsat.filterDate(startDate, closeDate).mean()
        .set('system:time_start', startDate.millis())
        .set('system:time_end'  , closeDate.millis());



// Function to accumulate composites for all years.
var accumulate = function(year, imageCollection) {
  return ee.ImageCollection(imageCollection).merge(composites(year));

var landsat_16 = years.iterate(accumulate, ee.ImageCollection([]));

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.