I found a problem when using s2cloudless mask, trying to make the composite and then clip it with a polygon. I've found this thread explaining how to use s2cloudless:

Displaying the cloud free composite of Sentinel2 using s2cloudless in GEE

in the last link, they calculate the median, but then if you try to clip it, each band has only 1 pixel. Check it out here:


The rendering of the map works like a charm, but of course, if I export the image to my drive, I have just one pixel per band. Why did the resolution drop to 1x1 pixel? The clipped box should contain thousand of pixels, not just one (check the print in the console).

  • Yes, i edited the question. The box should contain thousand of pixels, not just 1 pixel. Do you know why after the median and the clip I have this behavior?
    – Fabio DR
    Dec 14, 2022 at 11:19

1 Answer 1


Composites generated through reductions (like median) have "no" projection. That means they will deliver results in whatever output projection you ask for. So when you display them on the map, the output projection is Maps Mercator at whatever zoom level you're looking at. If you export them, it will use whatever projection you specify, but if you don't specify one, you'll get a default of WGS-84 at 1 degree per pixel.

So, in short, always specify a projection, scale and region in Export.

  • Oh okay that's why I have just one pixel! I tried setting .setDefaultProjection('EPSG:4326', null, 1000) after the median and it works! Is it the correct way to do it? And is there the possibility to enable again the pyramidal scale? Now it's nearly impossible to render something.
    – Fabio DR
    Dec 15, 2022 at 9:17

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.