ee.Geometry.evaluate

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

UtilizzoResi
Geometry.evaluate(callback)
ArgomentoTipoDettagli
this: computedobjectComputedObjectL'istanza ComputedObject.
callbackFunzioneUna funzione del modulo function(success, failure), chiamata quando il server restituisce una risposta. Se la richiesta ha esito positivo, l'argomento success contiene il risultato valutato. Se la richiesta non è andata a buon fine, l'argomento failure conterrà un messaggio di errore.

Esempi

Editor di codice (JavaScript)

// Define a callback function that prints a GeoJSON string.
var printGeoJSONString = function(geometry) {
  geometry = ee.Geometry(geometry);
  print(geometry.toGeoJSONString());
};

// Create a simple computed geometry.
var computedGeometry = ee.Geometry.Point(0, 0).buffer(10);

// Evaluate the callback function that asynchronously retrieves and prints
// the GeoJSON string representation of computed geometry.
computedGeometry.evaluate(printGeoJSONString);

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.Geometry objects.
# Use ee.Geometry.getInfo() instead.