ee.Dictionary.evaluate

Recupera in modo asincrono il valore di questo oggetto dal server e lo passa alla funzione di callback fornita.

UtilizzoResi
Dictionary.evaluate(callback)
ArgomentoTipoDettagli
questo: computedobjectComputedObjectL'istanza ComputedObject.
callbackFunzioneUna funzione del modulo function(success, failure), chiamata quando il server restituisce una risposta. Se la richiesta è riuscita, l'argomento success contiene il risultato valutato. Se la richiesta non è riuscita, l'argomento failure conterrà un messaggio di errore.

Esempi

Editor di codice (JavaScript)

// A dictionary (e.g. results of ee.Image.reduceRegion of an S2 image).
var dictServer = ee.Dictionary({
  B1: 182,
  B2: 219,
  B3: 443
});

// Use evaluate to transfer server-side dictionary to the client.
dictServer.evaluate(function(dictClient) {
  print('Client-side dot notation to access "B1" value', dictClient.B1);
  print('Client-side bracket notation to access "B1" value', dictClient['B1']);

  print('Client-side operations to print all key-value pairs');
  Object.keys(dictClient).forEach(function(key) {
    print('    ' + key + ': ' + dictClient[key]);
  });
});

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)

# The Earth Engine Python client library does not have an evaluate method for
# asynchronous evaluation of ee.Dictionary objects.
# Use ee.Dictionary.getInfo() instead.