ee.Dictionary.evaluate

यह फ़ंक्शन, इस ऑब्जेक्ट की वैल्यू को सर्वर से एसिंक्रोनस तरीके से वापस पाता है और उसे दिए गए कॉलबैक फ़ंक्शन को पास करता है.

इस्तेमालरिटर्न
Dictionary.evaluate(callback)
आर्ग्यूमेंटटाइपविवरण
यह: computedobjectComputedObjectComputedObject इंस्टेंस.
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.