ee.Number.bitwiseAnd

计算输入值的按位 AND。

用法返回
Number.bitwiseAnd(right)数字
参数类型详细信息
此:left数字左侧值。
right数字右侧值。

示例

代码编辑器 (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));

Python 设置

如需了解 Python API 和如何使用 geemap 进行交互式开发,请参阅 Python 环境页面。

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())