Following the Percentage value when resampling GEE.

You can see that some operations will give pixels that have a value and a (%), so: Is there a way to make avoid or solve this and get normal pixels with just the value... so the pixels with less than 100% do not look partially transparent?


The “percentage” value is the mask value. ee.Image.updateMask will replace an image's mask wherever it is not exactly zero (= fully transparent). So:

var imageWithoutPartialMask = image.updateMask(1);

(The 1 in this code is the new mask value; mask values are not actually stored as percentages but rather in the range 0.0 (transparent) to 1.0 (opaque).)

Note that if you are planning to get aggregated data from a region (e.g. with reduceRegion) this will cause the partial pixels at the edge to be over-weighted. Don't do this for images you're planning to do further computation on (unless you understand why the pixels are partially masked and know it doesn't matter or is correct for the situation); but for controlling the visualization it's fine.

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