ee.Date.evaluate

অ্যাসিঙ্ক্রোনাসভাবে সার্ভার থেকে এই বস্তুর মান পুনরুদ্ধার করে এবং এটি প্রদত্ত কলব্যাক ফাংশনে প্রেরণ করে।

ব্যবহার রিটার্নস
Date. evaluate (callback)
যুক্তি টাইপ বিস্তারিত
এই: computedobject কম্পিউটেড অবজেক্ট ComputedObject উদাহরণ.
callback ফাংশন ফর্ম ফাংশনের একটি ফাংশন (সফলতা, ব্যর্থতা), যখন সার্ভার উত্তর দেয় তখন বলা হয়। অনুরোধ সফল হলে, সাফল্যের যুক্তিতে মূল্যায়ন করা ফলাফল থাকে। অনুরোধ ব্যর্থ হলে, ব্যর্থতার যুক্তিতে একটি ত্রুটি বার্তা থাকবে।

উদাহরণ

কোড এডিটর (জাভাস্ক্রিপ্ট)

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

// A server-side ee.Date object.
var dateServer = ee.Date('2021-4-30');

// Use evaluate to transfer server-side date to the client. The result is
// an object with keys "type" and "value" where "value" is milliseconds since
// Unix epoch.
dateServer.evaluate(function(dateClient) {
  print('Client-side date is an object', typeof dateClient);
  print('Object keys include "type" and "value"', Object.keys(dateClient));
  print('"value" is milliseconds since Unix epoch', dateClient.value);
  print('Client-side date in JS Date constructor', new Date(dateClient.value));
});

পাইথন সেটআপ

পাইথন এপিআই এবং ইন্টারেক্টিভ ডেভেলপমেন্টের জন্য geemap ব্যবহার করার জন্য পাইথন এনভায়রনমেন্ট পৃষ্ঠাটি দেখুন।

import ee
import geemap.core as geemap

Colab (পাইথন)

# The Earth Engine Python client library does not have an evaluate method for
# asynchronous evaluation of ee.Date objects.
# Use ee.Date.getInfo() instead.