ee.Dictionary.evaluate
संग्रह की मदद से व्यवस्थित रहें
अपनी प्राथमिकताओं के आधार पर, कॉन्टेंट को सेव करें और कैटगरी में बांटें.
यह फ़ंक्शन, इस ऑब्जेक्ट की वैल्यू को सर्वर से एसिंक्रोनस तरीके से वापस पाता है और उसे दिए गए कॉलबैक फ़ंक्शन को पास करता है.
इस्तेमाल | रिटर्न |
---|
Dictionary.evaluate(callback) | |
आर्ग्यूमेंट | टाइप | विवरण |
---|
यह: computedobject | ComputedObject | ComputedObject इंस्टेंस. |
callback | फ़ंक्शन | यह फ़ंक्शन, फ़ंक्शन(success, failure) के फ़ॉर्म में होता है. जब सर्वर कोई जवाब देता है, तब इसे कॉल किया जाता है. अगर अनुरोध पूरा हो जाता है, तो success आर्ग्युमेंट में, आकलन किया गया नतीजा शामिल होता है. अगर अनुरोध पूरा नहीं होता है, तो गड़बड़ी के तर्क में गड़बड़ी का मैसेज दिखेगा. |
उदाहरण
कोड एडिटर (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]);
});
});
Python सेटअप करना
Python API और इंटरैक्टिव डेवलपमेंट के लिए geemap
का इस्तेमाल करने के बारे में जानकारी पाने के लिए,
Python एनवायरमेंट पेज देखें.
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.
जब तक कुछ अलग से न बताया जाए, तब तक इस पेज की सामग्री को Creative Commons Attribution 4.0 License के तहत और कोड के नमूनों को Apache 2.0 License के तहत लाइसेंस मिला है. ज़्यादा जानकारी के लिए, Google Developers साइट नीतियां देखें. Oracle और/या इससे जुड़ी हुई कंपनियों का, Java एक रजिस्टर किया हुआ ट्रेडमार्क है.
आखिरी बार 2025-07-26 (UTC) को अपडेट किया गया.
[null,null,["आखिरी बार 2025-07-26 (UTC) को अपडेट किया गया."],[[["\u003cp\u003e\u003ccode\u003eDictionary.evaluate()\u003c/code\u003e asynchronously retrieves the value of a server-side ComputedObject (like a dictionary) and passes it to a callback function.\u003c/p\u003e\n"],["\u003cp\u003eThe provided callback function handles the server response, receiving the evaluated result on success or an error message on failure.\u003c/p\u003e\n"],["\u003cp\u003e\u003ccode\u003eDictionary.evaluate()\u003c/code\u003e enables client-side access and manipulation of the server-side dictionary data using standard JavaScript operations.\u003c/p\u003e\n"],["\u003cp\u003eWhile the JavaScript API uses \u003ccode\u003eDictionary.evaluate()\u003c/code\u003e, the Python API leverages \u003ccode\u003eDictionary.getInfo()\u003c/code\u003e for synchronous retrieval of dictionary values.\u003c/p\u003e\n"]]],["The `evaluate` method asynchronously retrieves a `ComputedObject`'s value from the server and provides it to a callback function. The callback receives a success argument with the result or a failure argument with an error message. It's demonstrated with a dictionary example where server-side data is transferred to the client-side. In Python, `getInfo()` is used instead of `evaluate` for `ee.Dictionary` objects. The provided table details the usage, argument types, and their specifics.\n"],null,["# ee.Dictionary.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| Dictionary.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// A dictionary (e.g. results of ee.Image.reduceRegion of an S2 image).\nvar dictServer = ee.Dictionary({\n B1: 182,\n B2: 219,\n B3: 443\n});\n\n// Use evaluate to transfer server-side dictionary to the client.\ndictServer.evaluate(function(dictClient) {\n print('Client-side dot notation to access \"B1\" value', dictClient.B1);\n print('Client-side bracket notation to access \"B1\" value', dictClient['B1']);\n\n print('Client-side operations to print all key-value pairs');\n Object.keys(dictClient).forEach(function(key) {\n print(' ' + key + ': ' + dictClient[key]);\n });\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.Dictionary objects.\n# Use ee.Dictionary.getInfo() instead.\n```"]]