Google Earth Engine – Troubleshooting Faulty Landsat 5 and 7 NDVI/EVI Archives

evigoogle-earth-enginendvi

For my research, I need to use NDVI or EVI datasets in Google Earth Engine. I found Landsat 5 and 7 datasets (8 day, 32 day, anual) for both. However, no matter which combination of datasets and dates I choose, I always have the issue you can see in the image below.
enter image description here

Looking more closely, you can see the errors along the tiles. What could be causing this? Using the Inspector tool, I confirmed the values are also effected and it is not just a visual thing…
For now I am reverting to 250m MODIS data which does not have this issue.

enter image description here

Best Answer

The NDVI collections are just simple temporal composites of the actual data produced by the USGS (with a normalized ratio applied) and as such are pretty much only useful as browse products. If they don't suit your needs you should create your own with whatever modifications you feel are appropriate. In this case, I'd negative buffer the images by a few kilometers to remove all edge effects.

// Make a list of dates 32 days apart.
var start = '2015-01-01'
var days = ee.Number(32)
var steps = ee.Number(365).divide(days).floor()
var dates = ee.List.sequence(0, steps).map(function(period) {
  return ee.Date(start).advance(ee.Number(days).multiply(period), 'day')
})

// For each date, make a NDVI mosaic
var collection = dates.map(function(start) {
  var start = ee.Date(start)
  var ndvi = ee.ImageCollection('LANDSAT/LC08/C01/T1_TOA')
    .filterDate(start, start.advance(days, 'day'))
    .map(function(image) {
      // Compute NDVI and cut off the edges.
      return image.normalizedDifference(["B5", "B4"])
                  .clip(image.geometry().buffer(-6000))
    })
    .mosaic()
    .set('system:time_start', start.millis())
  return ndvi
})
collection = ee.ImageCollection(collection)

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

Map.addLayer(collection.first(), {palette: palette, min:0, max:1})

You can of course augment this to try to mask clouds (see the Cloud Masking examples in the code editor Examples folders) or by using the Surface Reflectance data instead of the TOA data.

Related Question