ee.Geometry.evaluate

このオブジェクトの値をサーバーから非同期で取得し、指定されたコールバック関数に渡します。

用途戻り値
Geometry.evaluate(callback)
引数タイプ詳細
これ: computedobjectComputedObjectComputedObject インスタンス。
callback関数サーバーが回答を返したときに呼び出される、function(success, failure) 形式の関数。リクエストが成功した場合、success 引数には評価結果が含まれます。リクエストが失敗した場合、failure 引数にエラー メッセージが含まれます。

コードエディタ(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 とインタラクティブな開発での 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.Geometry objects.
# Use ee.Geometry.getInfo() instead.