I'm working on classifying the 'active' part of rivers using Sentinel-2 imagery in GEE (including water and the unvegetated, exposed sediment around the edges of the river).

The goal is to output a cleaned, binary image mask that represents the active river.

My code is working reasonably well and successfully displays the output layer over small areas (e.g. https://code.earthengine.google.com/3d709645a96ba017d157dacbb164f636), but fails to display the output layer when the geometry polygon increases beyond approx 10 km x 10 km (e.g. https://code.earthengine.google.com/25ce08a90fb05cec02cf488a8a455012).

The error message is: "Output: Tile error: Output of image computation is too large (5 bands for 3260502 pixels = 124.4 MiB > 80.0 MiB)"

The error says that 5 bands are in the output image and wonder if this is partly causing the issue?

However, printing the output binary image to the console shows that only a single band is present.

I'd hoped that the binary format would reduce the image size and allow for analysis over larger areas (without the need to break down into smaller tiles e.g 10 km by 10 km).


The reason this fails is your calls to reproject(). It forces EE to calculate every pixel at 10m scale. When you're zoomed out, that will be too many pixels, just like the the error message suggests. You can try to display at zoom level 14, where the scale is about 10m - that should work. Here you can read up a bit more about scale in EE. What you want to do is simply remove any reproject() calls you have, unless you have a good reason to keep them:


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