0

I have some code that works when the final step is Map.addLayer() (i.e., no errors and it displays a value) but when I try to export the image, I get the following error:

Error: Number of pixels requested from Image.clip exceeds the maximum allowed (2^31). (Error code: 3)

if I remove the .clip() step, I get this error:

Error: Image.reduceRegions: Number of pixels requested from Image.load exceeds the maximum allowed (2^31). (Error code: 3)

I tried reducing the region to a very small polygon, but got the same errors.

Basically, I am trying to aggregate the values in this raster to a MODIS pixel, which I do in two steps:

var WV15 = t2015c.select('b1')
    .reduceResolution({
      reducer: ee.Reducer.sum().unweighted(),
      maxPixels: 65536
    })
    .reproject(t2015c.projection(), null, 50)
       .reduceResolution({
      reducer: ee.Reducer.sum().unweighted(),
      maxPixels: 65536
    })    .reproject("SR-ORG:6974", null, modisscale)    .rename('Taymir_WV_15').toDouble()

I also tried increasing shardSize to 20,000, as suggested here, but that did not fix the errors.

1
  • To be sure , have you verified that GEE understands the coordinate system "SR-ORG:6974" right?
    – user30184
    Commented Nov 8, 2021 at 8:46

1 Answer 1

1

You can't do this in one go; you need to export the intermediate result of the first reduceResolution.

Your Answer

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

Not the answer you're looking for? Browse other questions tagged or ask your own question.