Stay organized with collections
Save and categorize content based on your preferences.
Maps from input values to output values, represented by two parallel lists. Any input values not included in the input list are either set to defaultValue if it is given or masked if it isn't. Note that inputs containing floating point values might sometimes fail to match due to floating point precision errors.
Usage
Returns
Image.remap(from, to, defaultValue, bandName)
Image
Argument
Type
Details
this: image
Image
The image to which the remapping is applied.
from
List
The source values (numbers or ee.Array). All values in this list will be mapped to the corresponding value in 'to'.
to
List
The destination values (numbers or ee.Array). These are used to replace the corresponding values in 'from'. Must have the same number of values as 'from'.
defaultValue
Object, default: null
The default value to replace values that weren't matched by a value in 'from'. If not specified, unmatched values are masked out.
bandName
String, default: null
The name of the band to remap. If not specified, the first band in the image is used.
[[["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 2024-07-13 UTC."],[[["The `Image.remap()` function transforms image pixel values by mapping values from an input list (`from`) to a corresponding output list (`to`)."],["Unmatched input values are either assigned a specified `defaultValue` or masked if no default is provided."],["Remapping can be applied to a specific band using the `bandName` parameter, otherwise, the first band is used by default."],["Potential floating-point precision errors might affect the matching of input values."]]],[]]