ee.Array.gt

Restituisce 1 per ogni elemento solo se il primo valore è maggiore del secondo.

UtilizzoResi
Array.gt(right)Array
ArgomentoTipoDettagli
questo: leftArrayIl valore a sinistra.
rightArrayIl valore a destra.

Esempi

Editor di codice (JavaScript)

var empty = ee.Array([], ee.PixelType.int8());
print(empty.gt(empty));  // []

print(ee.Array([0]).gt([0]));  // [0]
print(ee.Array([1]).gt([2]));  // [0]
print(ee.Array([2]).gt([1]));  // [1]

print(ee.Array([-1, 0, 1]).gt([-2, 1, 0]));  // [1,0,1]

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)

empty = ee.Array([], ee.PixelType.int8())
display(empty.gt(empty))  # []

display(ee.Array([0]).gt([0]))  # [0]
display(ee.Array([1]).gt([2]))  # [0]
display(ee.Array([2]).gt([1]))  # [1]

display(ee.Array([-1, 0, 1]).gt([-2, 1, 0]))  # [1, 0, 1]