I have an NDVI collection wich I have created from the combination of different collections Landsat5 and 7.
How can I exctract the NDVI values of the centroids of each pixel, of each image from my collection and store them in a csv file, with their coordinates?
Example code:
var lst5 = ee.ImageCollection('LANDSAT/LT05/C01/T1_SR')
.filterDate('1984-10-01', '2011-10-01')
.map(maskL57SR)
var lst7 = ee.ImageCollection('LANDSAT/LE07/C01/T1_SR')
.filterDate('2011-10-01', '2013-04-07')
.map(maskL57SR)
var all = ee.ImageCollection(lst5.merge(lst7));
var addNDVI = function(image) {
var ndvi = image.normalizedDifference(['NIR', 'RED']).rename('NDVI');
return image.addBands(ndvi);
};
all = all.map(addNDVI)
maskL57SR
function is not present in the code (I'd remove it since it has no relation with the question). You have other problems though.NIR
andRED
are not images bands, soaddNDVI
will not work that way.