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
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)

// 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.