1

I calculated the EVI for a Landsat image from -1 to 1. However, when I use the inspector tool in GEE and click around on my image, I see I have values less than -1. Is there something wrong with my code?

var collectionID = 'LANDSAT/LC08/C01/T1_TOA'
var startDate = '2018-06-01'
var endDate = '2019-07-01'

var data = ee.ImageCollection(collectionID)
          .filterBounds(area)
          .filterDate(startDate, endDate)
          .filterMetadata('CLOUD_COVER', 'less_than', 10)
          .median();
print(data)

var FCC ={ bands: ['B5','B4','B3'],min:0, max: 0.3};
Map.addLayer(data,FCC,'Landsat8');

var evi = data.expression(
  '2.5 * ((NIR - RED) / (NIR + 6 * RED - 7.5 * BLUE + 1))', {
    'NIR' : data.select('B5'),
    'RED' : data.select('B4'),
    'BLUE' : data.select('B2')
});
print(evi)

Map.addLayer(evi, {min: -1, max: 1, palette: ['red', 'brown', 'yellow', 'green']}, 'EVI');

0

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.