ee.Number.and

Trả về 1 nếu và chỉ nếu cả hai giá trị đều khác 0.

Cách sử dụngGiá trị trả về
Number.and(right)Số
Đối sốLoạiThông tin chi tiết
this: leftSốGiá trị bên trái.
rightSốGiá trị bên phải.

Ví dụ

Trình soạn thảo mã (JavaScript)

print('Both 5 and 10 are not 0?', ee.Number(5).and(ee.Number(10)));  // 1
print('Both 5 and 0 are not 0?', ee.Number(5).and(ee.Number(0)));  // 0

Thiết lập Python

Hãy xem trang Môi trường Python để biết thông tin về API Python và cách sử dụng geemap cho quá trình phát triển tương tác.

import ee
import geemap.core as geemap

Colab (Python)

# 1
print('Both 5 and 10 are not 0?', ee.Number(5).And(ee.Number(10)).getInfo())
# 0
print('Both 5 and 0 are not 0?', ee.Number(5).And(ee.Number(0)).getInfo())