ee.Number.leftShift

Calcola lo spostamento a sinistra di v1 di v2 bit.

UtilizzoResi
Number.leftShift(right)Numero
ArgomentoTipoDettagli
questo: leftNumeroIl valore a sinistra.
rightNumeroIl valore a destra.

Esempi

Editor di codice (JavaScript)

/**
 * Unsigned 8-bit type example.
 *
 * 20 as binary:  00010100
 * Left shift 2:  01010000
 *
 * 01010000 is binary for 80.
 */

print(ee.Number(20).leftShift(2));  // 80

Configurazione di Python

Consulta la pagina Ambiente Python per informazioni sull'API Python e sull'utilizzo di geemap per lo sviluppo interattivo.

import ee
import geemap.core as geemap

Colab (Python)

"""Unsigned 8-bit type example.

20 as binary:  00010100
Left shift 2:  01010000

01010000 is binary for 80.
"""

print(ee.Number(20).leftShift(2).getInfo())  # 80