0

What is the best method to change the negative values (or values greater than some number) in every band of a multiband image to zero?

3

Think you could do that like this (https://code.earthengine.google.com/af976bcd1dbd1c64ec8a73f4d9aabf65):

// create an image for this example
var image = imageCollection.first()

// select boundary value, could also be zero
var value = 888.8

// create mask, gt mean greater-than, can also use lt(), lte() etc.
var mask = image.gt(2)

// create new image
var new_image = mask.multiply(value).add(image.multiply(mask.not()))

Map.addLayer(image)
Map.addLayer(new_image)

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