ee.Geometry.evaluate

서버에서 이 객체의 값을 비동기식으로 가져와 제공된 콜백 함수에 전달합니다.

사용반환 값
Geometry.evaluate(callback)
인수유형세부정보
computedobjectComputedObjectComputedObject 인스턴스입니다.
callback함수서버가 답변을 반환할 때 호출되는 function(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.