I have a function that performs an operation over a specific ROI. Now, I want to apply the same function over a collection of ROIs by mapping the function over a feature collection. Haven't found any feasible solution anywhere.
Here's what I am trying:
var myfunc = function(feature) {
var geometry = feature.geometry();
var L7 = ee.ImageCollection("LANDSAT/LE07/C01/T1_TOA")
.filterDate('2009-10-01','2010-12-01')
.filterBounds(geometry)
var Convert_scale = function(img) {
var I = ee.Image(img)
var correct_scale = I.select(['B1','B2','B3','B4','B5','B7']).multiply(0.0001)
return I.addBands(correct_scale,['B1','B2','B3','B4','B5','B7'],true)
}
L7 = L7.map(Convert_scale)
return L7;
}
var fc = ee.FeatureCollection("users/climateClass/strips_bross_allin");
var L7coll = ee.ImageCollection(fc.map(myfunc))
print(L7coll) //.first())
Map.addLayer((L7coll).mosaic())
The resulting image collection has zero bands and adding first image to map gives a Layer error
Here's my code.