1

I am trying to compute NDVI values for certain polygons using SEN3 dataset, but keeps getting negative values It seems I am getting wrong values for NIR and RED bands when trying to transform SENTINEL 3 OLCI values from radiance to surface reflectance. I am assuming that is the problem.

var sigma2VisParmSEN3 = {min: 0, max: 1, palette: 'red,orange,yellow,green'};

var SEN3 = ee.ImageCollection('COPERNICUS/S3/OLCI')
                  .filterDate('2019-01-01', '2019-02-01')

// Select bands for visualization and apply band-specific scale factors.
var SEN_corr = SEN3.select(['Oa17_radiance', 'Oa08_radiance'])
              .median()
              // Convert to radiance units.
              .multiply(ee.Image([0.00493004, 0.00876539]));

print(SEN_corr);
//calculate NDVI values per region - ***please change region to a shape you can use on your device***
var ndviSEN3 = SEN_corr
      .clipToCollection(region)
      .normalizedDifference(['Oa17_radiance', 'Oa08_radiance'])
      .rename('ndviSEN3');

Map.addLayer(ndviSEN3, sigma2VisParmSEN3, 'ndvi2SigmaSEN3');
var ndviFeatures = ee.FeatureCollection(ee.List(ndviSEN3
  .reduceRegion({
    reducer: ee.Reducer.toList(),
    geometry: region,
    scale: 10
  })
  .get('ndviSEN3'))
  .map(function (ndviSEN3) {
    return ee.Feature(null, {ndviSEN3: ndviSEN3})
  })
)
print(ndviFeatures.aggregate_array('ndviSEN3'))

I get these values for ndviFeatures:

ndvi values per pixel (negative)

(-0.06449873745441437, -0.3388196527957916.......)

Any suggestions?

2
  • NDVI ranges from -1 to +1, so negative values might be correct. Have you lokoed at the actual band values in your data? Also do you know what those polygons are showing? Are they vegetation or buildings?
    – winwaed
    Commented Apr 9, 2020 at 17:22
  • My polygons are different types - dry soil, tomatoes, and forest... My SEN2 NDVI values are all above 0. Commented Apr 10, 2020 at 12:19

1 Answer 1

2

I was very confused about this. I did a test comparing the NDVI of a single S2 and S3 scene, and got similar results as you - NDVI for S3 was too low. When I tried to divide with the radiance scales, instead of multiplying, I got the expected NDVI:

https://code.earthengine.google.com/074c58e2e82d5e919becee24e993d28d

The EE documentation is multiplying with the scales. Maybe this is wrong and this:

// Select bands for visualization and apply band-specific scale factors.
var rgb = dataset.select(['Oa08_radiance', 'Oa06_radiance', 'Oa04_radiance'])
    .median()
    // Convert to radiance units.
    .multiply(ee.Image([0.00876539, 0.0123538, 0.0115198]));

Should be:

// Select bands for visualization and apply band-specific scale factors.
var rgb = dataset.select(['Oa08_radiance', 'Oa06_radiance', 'Oa04_radiance'])
    .median()
    // Convert to radiance units.
    .divide(ee.Image([0.00876539, 0.0123538, 0.0115198]));

I'd be happy for some feedback on this.

Note that I used the radiance scales from the image properties, instead of the generic ones in the EE catalogue. That should give more accurate results. You could map over your collection and do the same.

4
  • 1
    I submitted an issue about the docs: issuetracker.google.com/issues/153682341 Commented Apr 10, 2020 at 11:42
  • Wonderful Daniel, I think indeed divide is the correct way of using the scale. I will also check with my colleagues and keep track of the issue that you have submitted and will update if there will be any news from my side. Thanks a lot! Commented Apr 10, 2020 at 11:54
  • Hello Daniel, I have used your code from you issue submitted and implemented it on my project. It seems to work great and I get reasonable numbers. You can check it out in this link: code.earthengine.google.com/66fa67f3d31710af9dc8b8784afb7057 Commented Apr 10, 2020 at 12:51
  • I'm happy it was useful. Commented Apr 10, 2020 at 13:10

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.