-1

I want to export a Sentinel-2 image from February (a mosaic). I got an error indicating request payload size exceeds the limit. I played around with scale and maxpixel, but the error kept coming. I attached related screenshots.

ROI: https://code.earthengine.google.com/?asset=projects/ee-israthesis/assets/bati_akdeniz_havzasi

//Map.addLayer(roi_simp);
//Map.addLayer(bah2)
//// Sentinel-2 Images ////
//cloud maks//
function maskS2clouds(image) {
var qa = image.select('QA60');
var cloudBitMask = 1 << 10;
var cirrusBitMask = 1 << 11;
var mask = qa.bitwiseAnd(cloudBitMask).eq(0)
          .and(qa.bitwiseAnd(cirrusBitMask).eq(0));
      return image.updateMask(mask).divide(10000);
    }

//mosaic per month//
var febr = ee.ImageCollection('COPERNICUS/S2_SR_HARMONIZED')
        .filterBounds(roi)
        .filterDate('2024-02-01', '2024-02-28') 
        .filterMetadata('CLOUDY_PIXEL_PERCENTAGE', 'less_than', 10)
        .select(['B2', 'B3', 'B4',  'B5', 'B6', 'B7', 'B8', 'B8A', 'B11', 'B12','QA60']) 
        .map(maskS2clouds)
        .median();
        
Export.image.toDrive({
image: febr,
region: roi,
description: 'febr',
scale: 10,
maxPixels: 1e13});

!!I might found the answer: First of all, my ROI was a feature collection, ending up too many vertices. I simply draw a geometry covering my ROI on GEE geometry tool. Then I run the code and it worked. What do you think?

enter image description here enter image description hereenter image description here

5
  • 2
    One question per Question please, as per the Tour. Please do not post code as a screenshot. Doing so forces anyone who wants to test your code to retype all of it. Commented Sep 29 at 13:37
  • @Vince thanks for the information, I kept 1 question only. Commented Sep 29 at 13:41
  • 2
    Provide a complete script in text, not screenshot. In particular, include where ‘roi’ is declared. Commented Sep 29 at 15:37
  • 1
    Please do not use screenshots for code. Edit your question and include your code as text with code formatting. Commented Sep 30 at 5:06
  • I added the script as you said. thanks! Commented Oct 1 at 6:54

0

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.