Skip to main content
Changed snippet from python to javascript
Source Link
Matt
  • 17.9k
  • 4
  • 23
  • 59

You can use the ee.Image.unmask() method


var noDataMask = myImage
                   .unmask(-99)    // give no data pixels an abitrary value outside the range of your data 
                   .eq(-99);       // make a boolean raster using the assigned value


noDataMask = (myImage
                   .unmask(-99)    # give no data pixels an abitrary value outside the range of your data 
                   .eq(-99))       # make a boolean raster using the assigned value

Here white is value 1, where the .eq(-99) evaluates to true (where clouds are masked, leaving patches of no data), and black is 0 where it is false.

enter image description here

To invert the mask, use .neq(-99) in place of .eq(-99).

You can use the ee.Image.unmask() method


var noDataMask = myImage
                   .unmask(-99)    // give no data pixels an abitrary value outside the range of your data 
                   .eq(-99);       // make a boolean raster using the assigned value

Here white is value 1, where the .eq(-99) evaluates to true (where clouds are masked, leaving patches of no data), and black is 0 where it is false.

enter image description here

To invert the mask, use .neq(-99) in place of .eq(-99).

You can use the ee.Image.unmask() method


noDataMask = (myImage
                   .unmask(-99)    # give no data pixels an abitrary value outside the range of your data 
                   .eq(-99))       # make a boolean raster using the assigned value

Here white is value 1, where the .eq(-99) evaluates to true (where clouds are masked, leaving patches of no data), and black is 0 where it is false.

enter image description here

To invert the mask, use .neq(-99) in place of .eq(-99).

added 61 characters in body
Source Link
Matt
  • 17.9k
  • 4
  • 23
  • 59

You can use the ee.Image.unmask() method


var noDataMask = myImage
                   .unmask(-99)    // give no data pixels an abitrary value outside the range of your data 
                   .eq(-99);       // make a boolean raster using the assigned value

Here white is value 1, where the .eq(-99) evaluates to true (where clouds are masked, leaving patches of no data), and black is 0 where it is false.

enter image description here

To invert the mask, use .neq(-99) in place of .eq(-99).

You can use the ee.Image.unmask() method


var noDataMask = myImage
                   .unmask(-99)    // give no data pixels an abitrary value outside the range of your data 
                   .eq(-99);       // make a boolean raster using the assigned value

Here white is value 1, where the .eq(-99) evaluates to true (where clouds are masked, leaving patches of no data), and black is 0 where it is false.

enter image description here

You can use the ee.Image.unmask() method


var noDataMask = myImage
                   .unmask(-99)    // give no data pixels an abitrary value outside the range of your data 
                   .eq(-99);       // make a boolean raster using the assigned value

Here white is value 1, where the .eq(-99) evaluates to true (where clouds are masked, leaving patches of no data), and black is 0 where it is false.

enter image description here

To invert the mask, use .neq(-99) in place of .eq(-99).

Source Link
Matt
  • 17.9k
  • 4
  • 23
  • 59

You can use the ee.Image.unmask() method


var noDataMask = myImage
                   .unmask(-99)    // give no data pixels an abitrary value outside the range of your data 
                   .eq(-99);       // make a boolean raster using the assigned value

Here white is value 1, where the .eq(-99) evaluates to true (where clouds are masked, leaving patches of no data), and black is 0 where it is false.

enter image description here