0

I am trying to compute BoA from a Landsat 8 composite image. However, I am getting the following error:

BOA: Layer error: List.get: List is empty (index is 0). I would appreciate any suggestions.

Cheers,

https://code.earthengine.google.com/5ec5e2703da350014565b5a661fbbb6e

I am expecting to get BoA of a composite Landsat 8 image. I haven't been able to find a solution out there.

var Infra = {min: 0, max: 0.35, bands: ['B5', 'B4', 'B3']};
//////////////      Load landsat 8 FOR 2018    ///////////////////

var image2018 = ee.ImageCollection('LANDSAT/LC08/C02/T1')
.filterBounds(AOI)
.select(['B1','B2','B3','B4','B5','B6','B7','B8','B9','B10','B11']);

 // SimpleComposite
 
 var composite2018 =  ee.Algorithms.Landsat.simpleComposite({
   collection : image2018.filterDate('2016-06-01', '2018-11-30'),
   asFloat: true
 });
 Map.addLayer(composite2018.clip(AOI), Infra, '2018 composite');
print("image2018", image2018); 






/// - Import the SIAC atmospheric correction module
var siac = require('users/marcyinfeng/utils:SIAC');

// - Apply SIAC and retrieve bottom of atmosphere (BOA) reflectance
//var L7_boa = siac.get_l7_sur(L7_col.first());
var L8_boa = siac.get_l8_sur(composite2018); 
//var S2_boa = siac.get_sur(S2_col.first()); 


// - Check and visualization
var Color_comp_01 = {bands:"B4,B3,B2", min: 0.0, max: 0.2, gamma: 1};
//var Color_comp =    {bands:"B4,B3,B2", min:200, max:2000, gamma: 1};
//Map.addLayer(img, Color_comp, 'TOA');
Map.addLayer(L8_boa, Color_comp_01, 'BOA');
//Map.centerObject(L8_boa)
Map.centerObject(AOI)

0 Answers0