"Error creating or submitting task Request payload size exceeds the limit: 4194304 bytes"

Viewed 1676

I am having "Error creating or submitting task Request payload size exceeds the limit: 4194304 bytes" for the following code.

Please note that changing scale is not an option for me, I need 30 m scale.

This error goes away if I manually draw a geometry. But that is not perfect. and also I have a number of areas.

Moreover, when I use manually drawn geometry my raster has NDVI value is -3.40282e+38 to 3.40282e+38.

var table = ee.FeatureCollection("users/tafzilamouly/QLD"),
        L5 = ee.ImageCollection("LANDSAT/LT05/C01/T1_SR"),
        hansen = ee.Image("UMD/hansen/global_forest_change_2018_v1_6");

    //Filter region and time period

    var L52009annual= L5.filterDate('2009-01-01',"2009-12-31")

    var AUS= ee.FeatureCollection(table)
    var QLD= AUS.geometry()

    var Australia2009annual= ee.ImageCollection(L52009annual).filterBounds(QLD)

    //Map.addLayer(Australia2009annual, {}, 'Australia2009annual')


    //NDVI

    var addNDVI= function addNDVI(image){
      var ndvi= image.normalizedDifference(['B4', 'B3']).rename('NDVI');
      return image.addBands(ndvi);
    };

    // Cloud mask
    var cloudMaskL457 = function(image) {
      var qa = image.select('pixel_qa');
      // If the cloud bit (5) is set and the cloud confidence (7) is high
      // or the cloud shadow bit is set (3), then it's a bad pixel.
      var cloud = qa.bitwiseAnd(1 << 5)
              .and(qa.bitwiseAnd(1 << 7))
              .or(qa.bitwiseAnd(1 << 3))
      // Remove edge pixels that don't occur in all bands
      var mask2 = image.mask().reduce(ee.Reducer.min());
      return image.updateMask(cloud.not()).updateMask(mask2);
    };

    // land mask

    var landMask = function(image) {
    var datamask = hansen.select('datamask');
    var mask = datamask.eq(1);
    return image.updateMask(mask);
    };

    var NDVI2009annual= ee.ImageCollection(Australia2009annual)
        .map(addNDVI)
        .map(cloudMaskL457)
        .map(landMask)
        .mean()

    //print(NDVI2009annual)
    //select band NDVI
    var NDVI= NDVI2009annual.select('NDVI')
    //select NDVI value 0-1
    var positiveNDVI2009annual= NDVI.mask(NDVI)
    print(positiveNDVI2009annual)
    Map.addLayer(positiveNDVI2009annual, {}, 'positiveNDVI2009annual')

    Export.image.toDrive({
      image: positiveNDVI2009annual,
      description: 'NDVI_2009_annual',
      region: QLD,
      scale: 30,
      fileFormat: 'GeoTIFF',
      maxPixels: 33491829976,
      });
1 Answers

I got the same error message Request payload size exceeds the limit: 4194304 bytes. When I tried to use a multi geometry during export "region: my_geometry". It also caused a slow process, unrealistic, even caused the page unresponsive. I doubt the complex in geometry.

My solution was,

  • I mask my image (by clipping with geometry and update the mask to my image).
  • Instead of using "region: my_geometry" in the export function, I omitted it and zoom the map into the full area. Then I could export it successfully.
Related