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.