Stay organized with collections
Save and categorize content based on your preferences.
Replaces mask and value of the input image with the mask and value of another image at all positions where the input mask is zero. The output image retains the metadata of the input image. By default, the output image also retains the footprint of the input, but setting sameFootprint to false allows to extend the footprint.
Usage
Returns
Image.unmask(value, sameFootprint)
Image
Argument
Type
Details
this: input
Image
Input image.
value
Image, default: null
New value and mask for the masked pixels of the input image. If not specified, defaults to constant zero image which is valid everywhere.
sameFootprint
Boolean, default: true
If true (or unspecified), the output retains the footprint of the input image. If false, the footprint of the output is the union of the input footprint with the footprint of the value image.
[[["Easy to understand","easyToUnderstand","thumb-up"],["Solved my problem","solvedMyProblem","thumb-up"],["Other","otherUp","thumb-up"]],[["Missing the information I need","missingTheInformationINeed","thumb-down"],["Too complicated / too many steps","tooComplicatedTooManySteps","thumb-down"],["Out of date","outOfDate","thumb-down"],["Samples / code issue","samplesCodeIssue","thumb-down"],["Other","otherDown","thumb-down"]],["Last updated 2023-10-06 UTC."],[[["The `unmask()` method replaces masked pixel values in an image with specified values or data from another image."],["It's used to fill in areas where the input image has invalid or missing data, often represented by a mask with zero values."],["By default, the output image retains the original image's footprint, but you can change this behavior using the `sameFootprint` parameter."],["`unmask()` can be useful for tasks like setting nodata values for export, merging images, or filling gaps in data."]]],[]]