I am trying to extract rainfall (CHIRPS) values for a set of locations but I got the following error:
Image.reduceRegions: Unable to find a crs
This does not happens with other datasets (such as terraclimate)
The problem arise when I start downloading the table from Tasks
Here is the link to the code I have run https://code.earthengine.google.com/c27f2156e81824b0990dcfe0b0a6f455
The error should be here:
// do extraction
var ft = ee.FeatureCollection(ee.List([]));
//Function to extract values from image collection based on point file and export as a table
var fill = function(img, ini) {
var inift = ee.FeatureCollection(ini);
var scale = ee.Image(MM.first()).projection().nominalScale().getInfo()
var ft2 = img.reduceRegions(pts, ee.Reducer.first(),scale);
var date = img.date().format("YYYYMM");
var ft3 = ft2.map(function(f){return f.set("date", date)});
return inift.merge(ft3);
};
// Iterates over the ImageCollection
var profile = ee.FeatureCollection(MM.iterate(fill, ft));
Please can you help me?
Thanks
g.