Earth Engine ha introdotto
livelli di quota non commerciali per salvaguardare le risorse di calcolo condivise e garantire prestazioni affidabili per tutti. I progetti non commerciali utilizzano il livello Community per impostazione predefinita, anche se puoi modificare il livello di un progetto in qualsiasi momento.
Google utilizza la tecnologia AI per tradurre i contenuti nella tua lingua preferita. Le traduzioni generate dall'AI potrebbero contenere errori.
ee.Dictionary.set
Mantieni tutto organizzato con le raccolte
Salva e classifica i contenuti in base alle tue preferenze.
Imposta un valore in un dizionario.
| Utilizzo | Resi |
|---|
Dictionary.set(key, value) | Dizionario |
| Argomento | Tipo | Dettagli |
|---|
questo: dictionary | Dizionario | |
key | Stringa | |
value | Oggetto | |
Esempi
Editor di codice (JavaScript)
// A dictionary (e.g. results of ee.Image.reduceRegion of an S2 image).
var dict = ee.Dictionary({
B1: 182,
B2: 219,
B3: 443
});
print('Set value for B3 key as -9999', dict.set('B3', -9999));
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)
# A dictionary (e.g. results of ee.Image.reduceRegion of an S2 image).
dic = ee.Dictionary({
'B1': 182,
'B2': 219,
'B3': 443
})
display('Set value for B3 key as -9999:', dic.set('B3', -9999))
[null,null,["Ultimo aggiornamento 2025-10-30 UTC."],[],["The `Dictionary.set(key, value)` method modifies a dictionary by assigning a new value to a specified key. It takes a dictionary, a string `key`, and an `object` value as arguments, and returns the modified dictionary. The examples demonstrate setting the value of the 'B3' key to -9999 within dictionaries, using both JavaScript and Python. The key should be a String, and the value can be any object.\n"]]