7

I am using the Landsat ETM+ to OLI harmonization tutorial but I need it for Landsat collection 2 L2 data, this means the scaling factors have changed. I am not sure how to apply the scaling factors in this case. The tutorial multiplies the y-intercept constants by the scaling factor (10,000, see below) but I'm not sure how would that apply to the scaling factor and offset for collection 2 (0.0000275 + -0.2).

var coefficients = {itcps: ee.Image.constant([0.0003, 0.0088, 0.0061, 0.0412, 0.0254, 0.0172])
         .multiply(10000), slopes: ee.Image.constant([0.8474, 0.8483, 0.9047, 0.8462, 0.8937, 0.9071])};

I noticed some one already asked this question here, but I am wondering if any one could expand with code on how to actually use the new scaling factors for collection 2 in this case?

2
  • Are you able to load ETM+ Collection 2 Tier 2 data in GEE? I tried but there are no images available yet, or maybe I have done something wrong. I know some images (like L7 T1 T2 SR) are loaded with reflectance values, not DN. Check it for me, please. If it's loaded with a 0 - 1 range, there is no need to add .multiply(10000) or apply scale factor
    – aldo_tapia
    Dec 16, 2021 at 21:13
  • 1
    Hi @aldo_tapia, I am using Landsat collection 2 Level 2 (for corrected SR) and T1, I've been able to use the collection in GEE no problem (eg: 'LANDSAT/LE07/C02/T1_L2'). The min and max values for the bands with SR are 1-65455. That's why I am assuming I still need to apply the scaling factor.
    – salixtreks
    Dec 16, 2021 at 21:42

1 Answer 1

5

To compute reflectance value using scale factor for both collections (1 and 2) use the following functions:

var col1_DN = ee.ImageCollection("LANDSAT/LE07/C01/T2_SR");
var col2_DN = ee.ImageCollection("LANDSAT/LE07/C02/T1_L2");


var col1_SR = col1_DN.map(function(image){return image.multiply(0.0001)})
var col2_SR = col2_DN.map(function(image){return image.multiply(0.0000275).add(-0.2)})

Given the example you mentioned, you can avoid the use .multiply(10000) and harmonize over reflectance values instead of DN values.

You can add an extra step for this purpose:

var coefficients = {
  itcps: ee.Image.constant([0.0003, 0.0088, 0.0061, 0.0412, 0.0254, 0.0172])
  slopes: ee.Image.constant([0.8474, 0.8483, 0.9047, 0.8462, 0.8937, 0.9071])
};

// Here goes the other code skipped in this snipet

function etmToOli(img) {
  return img.select(['Blue', 'Green', 'Red', 'NIR', 'SWIR1', 'SWIR2'])
      .multiply(0.0000275)
      .add(-0.2) 
      .multiply(coefficients.slopes)
      .add(coefficients.itcps)
      .addBands(img.select('pixel_qa'));
}

Since this works with reflectance data, .round() and .toShort() are out because output is float. You can apply also a 10000 factor for matching Collection 1 scheme after computing reflectance as well, but it all depends on your needs (if integer values made this code faster for instance).

11
  • Awesome! Checking the bands, the values are now from -0.16 to 1.5, slightly higher than 1 and below 0, perhaps for areas where there's water? Also, one quick question: this tutorial from google developers only scales landsat 5 and 7, but not 8. Should I still scale L8 using the first function from your answer?
    – salixtreks
    Dec 17, 2021 at 14:50
  • I just realized that the tutorial is actually only applying the scale to the y-intercept values (stored in the gee dictionary) and not the bands in the image collection. The author seems to be assuming that the L7 C01 SR images are already scaled. However, the USGS info page link says that a scale needs to be applied to both 1 and 2 SR collection products. I only realized this problem when after running the code with the new scale, my cloud mask wasn't working at all (shows black out images).
    – salixtreks
    Dec 17, 2021 at 16:35
  • @salixtreks you can apply first the cloud mask and then apply the harmonization transformation, the result will be the same. BTW it's weird because all transformations are applied from blue to SWIR2 bands, not pixel_qa band.
    – aldo_tapia
    Dec 17, 2021 at 19:14
  • Yes, I had definitely tried that and I still had an end result of blacked out images. However, what ended up working for me was adding the scaling factor and offset to the y-intercept. I can post the answer too.
    – salixtreks
    Dec 17, 2021 at 22:21
  • 2
    You should not assume that the Roy et al. (2016) coefficients are applicable to the Collection 2 data. Those coefficients were developed from pre-collection data. Improvements from pre-collection to C2 may negate the need for correction (you risk de-harmonizing by applying those coefficients). Please verify that it actually improves inter-sensor harmony before using/analyzing the results. See more info in this thread: groups.google.com/g/google-earth-engine-developers/c/… Dec 20, 2021 at 18:21

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

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