I am facing a technical difficulty with Google Earth Engine
I am trying to retrieve the albedo value of the state of Idaho by using Landsat7 TOA reflectance imagery over the span of a year. ('2005-01-01','2005-12-31').
The equation to retrieve the albedo is known as:
var albedo = ((0.356*blue)+(0.130*red)+(0.373*nir)+(0.085*swir)+
(0.072*swir2)- 0.018)/ (1.016);
Here is the whole code that I have so far:
var region = table;
var col05 = donnee.filterBounds(region).filterDate('2005-01-01', '2005-12-31');
var calc_albedo = function(donnee){
var red = donnee.select('B3');
var blue = donnee.select('B1');
var nir = donnee.select('B4');
var swir = donnee.select('B5');
var swir2 = donnee.select('B7');
var albedo = ((0.356*blue)+(0.130*red)+(0.373*nir)+(0.085*swir)+(0.072*swir2)- 0.018)/ (1.016);
return albedo
}
var albedo_2005 = col05.map(calc_albedo);
var clipped05 = albedo_2005.median().clip(region);
strong textMap.addLayer(clipped05,{min: 0.0, max: 1},'albedo_2005');
var region = table is a shapefile of the Idaho state I have upload via the tool google provides. var donnee is the ImageCollection "USGS Landsat 7 TOA Reflectance (Orthorectified)"
Finally, the error I am receiving is :
albedo_2005: Layer error: reduce.median, argument 'collection': Invalid type. Expected: ImageCollection. Actual: FeatureCollection.
return ee.Image(albedo)
?