bitsMaskAny#
- geetools.ee_image.ImageAccessor.bitsMaskAny(bits_info, classes=None, band=0)#
Create a mask using the bits information.
- Parameters:
- Returns:
an image with one band named ‘any_mask’, with 1s where ANY of the classes is present and 0s where not.
- Return type:
Example
import ee, geetools ee.Initialize() ls = ee.Image("LANDSAT/LC09/C02/T1_L2/LC09_232090_20220508") bits = { '7': 'Water', '8-9': { '1': 'Low', '2': 'Medium', '3': 'High' } } mask = ls.geetools.bitsMaskAny(bits, ['Water', 'High'], 'QA_PIXEL')