1

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.

Gianca
  • 109
  • 10
  • I had no problems running the code in your link. – Kevin Apr 04 '19 at 01:55
  • Hi Kevin, the problem arise when you download the table from Tasks. Sorry I was not clear enough in my question. Thanks! – Gianca Apr 04 '19 at 08:05
  • I cannot reproduce your error, as I got a 'permission' error beforehand. It's `Collection.loadTable: Permission denied for Fusion Table '1lk2rFqdyIuZfitL40PAvqFW6uzB-2W55aUFnQF3b'` – Kevin Apr 04 '19 at 08:28
  • Kevin, sorry. here is the new link with some points that should work. thanks for you support, it is really important : https://code.earthengine.google.com/a3bbc6bf7e0ccd16eb975350bcb1058a – Gianca Apr 04 '19 at 10:36

1 Answers1

0

The problem with your code is that you are using years 2018 and 2019 for all months. For some time that you have selected, there is no data so your monthly value is returning image with 0 bands. Since your image has no bands, the reducer can't find any information so it gives back crs not found. I successfully ran your code just by changing the years to start at 2017 and end at 2018.

Nishanta Khanal
  • 316
  • 2
  • 4