I have a shapefile with multi-polygons and when I export an image of the area through Google Earth Engine this message appears:
"Request payload size exceeds the limit:41943304 bytes".
The problem was the availability of multi-polygons in one shapefile. Is there any procedure to solve the issue?
Here is the code:
Map.centerObject(AOI, 9)
var ndviParams ={min: 0, max: 1, palette: ['FFFFFF', 'CE7E45', 'FCD163', '66A000', '207401','056201', '004C00', '023B01', '012E01', '011301']};
var sentinal=ee.ImageCollection("COPERNICUS/S2")
var nir11 = image11.select('B8');
var red11 = image11.select('B4');
var ndvi11 = nir11.subtract(red11).divide(nir11.add(red11)).rename('NDVI').clip(A);
Map.addLayer(ndvi11, ndviParams, 'NDVI November');
Export.image.toDrive({image: ndvi11,description: 'NDVI_Nov',maxPixels: 3e12,scale:
Best Answer
Your error message means that the process request sent to Earth Engine servers is really large. Common culprits include: (a) a large amount of data (e.g., very complex geometries, large arrays) included in the script, and/or (b) the script has client-side loops that could be server-side loops, which has the effect of replicating a large, complex expression on each iteration.
Your code is not reproducible (see Nick's comment) so it is hard to diagnose the problem well. My guess is it stems from clipping by a complex
Geometry
orFeatureCollection
on this line:Try clipping with
clipToCollection(A)
, ifA
is aFeatureCollection
. Also, don't clip, if you don't need to. You can specify a region to export when callingExport.image.toDrive
using theregion
parameter. It will accept aFeatureCollection
,Feature
, orGeometry
object. Note thatregion
should always be set when exporting because if not specified, the region exported defaults to the viewport (Map extent) at the time of invocation.