ee.Geometry.evaluate

מאחזרת באופן אסינכרוני את הערך של האובייקט הזה מהשרת ומעבירה אותו לפונקציית הקריאה החוזרת שצוינה.

שימושהחזרות
Geometry.evaluate(callback)
ארגומנטסוגפרטים
this: computedobjectComputedObjectהמכונה של ComputedObject.
callbackפונקציהפונקציה של הפונקציה form function(success, failure), שמופעלת כשהשרת מחזיר תשובה. אם הבקשה הצליחה, הארגומנט success מכיל את התוצאה שהתקבלה. אם הבקשה נכשלה, הארגומנט failure יכיל הודעת שגיאה.

דוגמאות

Code Editor (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);

הגדרה של Python

בדף סביבת Python מפורט מידע על API בשפת Python ועל השימוש ב-geemap לפיתוח אינטראקטיבי.

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.