0

I'm facing an error when trying to export all the pixel value of a ImageCollection. The error is : enter image description here

But when I check the corresponding image in my dataset I don't see anything different from the other. Does anybody have an idea of what this due to ?

The function causing this error is the following :

function valuesByBands(img){
  var valuesByBand = img
  .reduceRegion({
    reducer : ee.Reducer.toList(),
    geometry : ROI, 
    crs : ModisProjection})
   var features = ee.FeatureCollection(
  ee.Array(valuesByBand.values())
    .transpose()
    .toList()
    .map(function (values) {
      return ee.Feature(null, ee.Dictionary.fromLists(
        valuesByBand.keys(), 
        values
      ))
    })
    )
     var SumFeatures = firstFeatures.merge(features)
    return SumFeatures
}

var firstFeatures = ee.FeatureCollection(
  ee.Array(valuesByBand.values())
    .transpose()
    .toList()
    .map(function (values) {
      return ee.Feature(null, ee.Dictionary.fromLists(
        valuesByBand.keys(), 
        values
      ))
    })
)

Here is the full code I use : https://code.earthengine.google.com/2b265a35b3b0653aa13459d720e65536

4
  • Could you provide a smaller reproducible example? Commented Oct 18, 2023 at 8:23
  • What do you mean by this ? Like maybe a smaller study time ? I tried with one year of data and I worked Commented Oct 18, 2023 at 8:25
  • There's too much going on in your script. It's likely that you don't need to do everything exactly as you are doing, e.g. calculate those specific indices, etc.. to be able to reproduce the error you are getting. A minimal reproducible example increases your chances of getting a good quality answer. Commented Oct 18, 2023 at 8:29
  • I edited my question Commented Oct 18, 2023 at 8:37

0

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.