ee.Number.bitwiseAnd

Calcule l'opérateur AND (ET) bit à bit des valeurs d'entrée.

UtilisationRenvoie
Number.bitwiseAnd(right)Nombre
ArgumentTypeDétails
ceci : leftNombreValeur de gauche.
rightNombreValeur de droite.

Exemples

Éditeur de code (JavaScript)

/**
 * Unsigned 8-bit type example.
 *
 * 25 as binary:   00011001
 * 21 as binary:   00010101
 * Both digits 1?: 00010001
 *
 * 00010001 is unsigned 8-bit binary for 17.
 */

print(ee.Number(25).bitwiseAnd(21));

Configuration de Python

Consultez la page Environnement Python pour en savoir plus sur l'API Python et sur l'utilisation de geemap pour le développement interactif.

import ee
import geemap.core as geemap

Colab (Python)

"""Unsigned 8-bit type example.

25 as binary:   00011001
21 as binary:   00010101
Both digits 1?: 00010001

00010001 is unsigned 8-bit binary for 17.
"""

print(ee.Number(25).bitwiseAnd(21).getInfo())