ee.FeatureCollection.evaluate
קל לארגן דפים בעזרת אוספים
אפשר לשמור ולסווג תוכן על סמך ההעדפות שלך.
הפונקציה מאחזרת באופן אסינכרוני את הערך של האובייקט הזה מהשרת ומעבירה אותו לפונקציית הקריאה החוזרת שסופקה.
שימוש | החזרות |
---|
FeatureCollection.evaluate(callback) | |
ארגומנט | סוג | פרטים |
---|
זה: computedobject | ComputedObject | המופע של ComputedObject. |
callback | פונקציה | פונקציה מהצורה function(success, failure), שמופעלת כשהשרת מחזיר תשובה. אם הבקשה הצליחה, הארגומנט success מכיל את התוצאה המוערכת. אם הבקשה נכשלה, הארגומנט failure יכיל הודעת שגיאה. |
דוגמאות
עורך הקוד (JavaScript)
/**
* WARNING: this function transfers data from Earth Engine servers to the
* client. Doing so can negatively affect request processing and client
* performance. Server-side options should be used whenever possible.
* Learn more about the distinction between server and client:
* https://developers.google.com/earth-engine/guides/client_server
*/
// FeatureCollection of power plants in Belgium.
var fcServer = ee.FeatureCollection('WRI/GPPD/power_plants')
.filter('country_lg == "Belgium"');
fcServer.evaluate(function(fcClient) {
print('Client-side feature collection is an object', typeof fcClient);
print('Feature collection object keys', Object.keys(fcClient));
print('Array of features', fcClient.features);
print('Properties for first feature', fcClient.features[0].properties);
});
הגדרת Python
מידע על Python API ועל שימוש ב-geemap
לפיתוח אינטראקטיבי מופיע בדף
Python Environment.
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.FeatureCollection objects.
# Use ee.FeatureCollection.getInfo() instead.
אלא אם צוין אחרת, התוכן של דף זה הוא ברישיון Creative Commons Attribution 4.0 ודוגמאות הקוד הן ברישיון Apache 2.0. לפרטים, ניתן לעיין במדיניות האתר Google Developers. Java הוא סימן מסחרי רשום של חברת Oracle ו/או של השותפים העצמאיים שלה.
עדכון אחרון: 2025-07-26 (שעון UTC).
[null,null,["עדכון אחרון: 2025-07-26 (שעון UTC)."],[[["\u003cp\u003e\u003ccode\u003eevaluate()\u003c/code\u003e retrieves the value of a ComputedObject (like a FeatureCollection) from the Earth Engine server and passes it to a callback function.\u003c/p\u003e\n"],["\u003cp\u003eThe callback function is structured as \u003ccode\u003efunction(success, failure)\u003c/code\u003e where \u003ccode\u003esuccess\u003c/code\u003e contains the result if the request succeeds, and \u003ccode\u003efailure\u003c/code\u003e contains an error message if it fails.\u003c/p\u003e\n"],["\u003cp\u003eThis method transfers data from the server to the client, potentially impacting performance; server-side options are generally preferred.\u003c/p\u003e\n"],["\u003cp\u003eFor asynchronous evaluation of \u003ccode\u003eee.FeatureCollection\u003c/code\u003e in the Earth Engine Python client library, use \u003ccode\u003egetInfo()\u003c/code\u003e instead of \u003ccode\u003eevaluate()\u003c/code\u003e.\u003c/p\u003e\n"]]],[],null,["# ee.FeatureCollection.evaluate\n\n\u003cbr /\u003e\n\nAsynchronously retrieves the value of this object from the server and passes it to the provided callback function.\n\n\u003cbr /\u003e\n\n| Usage | Returns |\n|----------------------------------------|---------|\n| FeatureCollection.evaluate`(callback)` | |\n\n| Argument | Type | Details |\n|------------------------|----------------|--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|\n| this: `computedobject` | ComputedObject | The ComputedObject instance. |\n| `callback` | Function | A function of the form function(success, failure), called when the server returns an answer. If the request succeeded, the success argument contains the evaluated result. If the request failed, the failure argument will contains an error message. |\n\nExamples\n--------\n\n### Code Editor (JavaScript)\n\n```javascript\n/**\n * WARNING: this function transfers data from Earth Engine servers to the\n * client. Doing so can negatively affect request processing and client\n * performance. Server-side options should be used whenever possible.\n * Learn more about the distinction between server and client:\n * https://developers.google.com/earth-engine/guides/client_server\n */\n\n// FeatureCollection of power plants in Belgium.\nvar fcServer = ee.FeatureCollection('WRI/GPPD/power_plants')\n .filter('country_lg == \"Belgium\"');\n\nfcServer.evaluate(function(fcClient) {\n print('Client-side feature collection is an object', typeof fcClient);\n print('Feature collection object keys', Object.keys(fcClient));\n print('Array of features', fcClient.features);\n print('Properties for first feature', fcClient.features[0].properties);\n});\n```\nPython setup\n\nSee the [Python Environment](/earth-engine/guides/python_install) page for information on the Python API and using\n`geemap` for interactive development. \n\n```python\nimport ee\nimport geemap.core as geemap\n```\n\n### Colab (Python)\n\n```python\n# The Earth Engine Python client library does not have an evaluate method for\n# asynchronous evaluation of ee.FeatureCollection objects.\n# Use ee.FeatureCollection.getInfo() instead.\n```"]]