공지사항:
2025년 4월 15일 전에 Earth Engine 사용을 위해 등록된 모든 비상업용 프로젝트는 Earth Engine 액세스를 유지하기 위해
비상업용 자격 요건을 인증해야 합니다.
ee.Dictionary.getInfo
컬렉션을 사용해 정리하기
내 환경설정을 기준으로 콘텐츠를 저장하고 분류하세요.
서버에서 이 객체의 값을 가져옵니다.
콜백 함수가 제공되지 않으면 요청이 동기적으로 이루어집니다. 콜백이 제공되면 요청이 비동기적으로 이루어집니다.
동기 모드는 서버를 기다리는 동안 다른 모든 코드 (예: EE 코드 편집기 UI)를 중지하므로 비동기 모드를 사용하는 것이 좋습니다. 비동기 요청을 하려면 getInfo()보다 evaluate()를 사용하는 것이 좋습니다.
이 객체의 계산된 값을 반환합니다.
사용 | 반환 값 |
---|
Dictionary.getInfo(callback) | 객체 |
인수 | 유형 | 세부정보 |
---|
다음과 같은 경우: computedobject | ComputedObject | ComputedObject 인스턴스입니다. |
callback | 함수(선택사항) | 선택적 콜백입니다. 제공되지 않으면 호출이 동기적으로 이루어집니다. |
예
코드 편집기 (JavaScript)
// A dictionary (e.g. results of ee.Image.reduceRegion of an S2 image).
var dict = ee.Dictionary({
B1: 182,
B2: 219,
B3: 443
});
// Request the server-side ee.Dictionary as a client-side object.
print('Client-side object', dict.getInfo());
print('Using the client-side object', Object.keys(dict.getInfo()).length);
Python 설정
Python API 및 geemap
를 사용한 대화형 개발에 관한 자세한 내용은
Python 환경 페이지를 참고하세요.
import ee
import geemap.core as geemap
Colab (Python)
# A dictionary (e.g. results of ee.Image.reduceRegion of an S2 image).
dic = ee.Dictionary({
'B1': 182,
'B2': 219,
'B3': 443
})
# Request the server-side ee.Dictionary as a client-side object.
print('Client-side object:', dic.getInfo())
print('Using the client-side object (e.g. fetch number of keys):',
len(dic.getInfo().keys()))
달리 명시되지 않는 한 이 페이지의 콘텐츠에는 Creative Commons Attribution 4.0 라이선스에 따라 라이선스가 부여되며, 코드 샘플에는 Apache 2.0 라이선스에 따라 라이선스가 부여됩니다. 자세한 내용은 Google Developers 사이트 정책을 참조하세요. 자바는 Oracle 및/또는 Oracle 계열사의 등록 상표입니다.
최종 업데이트: 2025-07-26(UTC)
[null,null,["최종 업데이트: 2025-07-26(UTC)"],[[["\u003cp\u003eRetrieves the value of a ComputedObject from the Earth Engine server, enabling client-side use.\u003c/p\u003e\n"],["\u003cp\u003eOffers synchronous and asynchronous retrieval modes, with asynchronous being preferred to avoid blocking other code execution.\u003c/p\u003e\n"],["\u003cp\u003e\u003ccode\u003eevaluate()\u003c/code\u003e is recommended for asynchronous requests, while \u003ccode\u003egetInfo()\u003c/code\u003e can be used with a callback or synchronously.\u003c/p\u003e\n"],["\u003cp\u003eReturns the computed value as a client-side object, allowing interaction with it using standard JavaScript or Python methods.\u003c/p\u003e\n"],["\u003cp\u003eProvides JavaScript and Python code examples to illustrate how to retrieve and utilize the object's value.\u003c/p\u003e\n"]]],["The `getInfo()` method retrieves an object's value from the server. It can operate synchronously, halting other code execution, or asynchronously via a callback function. Asynchronous mode is favored, and the `evaluate()` method is recommended in that case. The method returns the computed object value. Example usage involves requesting a server-side dictionary as a client-side object in both JavaScript and Python. This is illustrated with a dictionary of band values from an image, demonstrating both retrieval and simple usage of the object.\n"],null,["# ee.Dictionary.getInfo\n\n\u003cbr /\u003e\n\nRetrieves the value of this object from the server.\n\n\u003cbr /\u003e\n\nIf no callback function is provided, the request is made synchronously. If a callback is provided, the request is made asynchronously.\n\nThe asynchronous mode is preferred because the synchronous mode stops all other code (for example, the EE Code Editor UI) while waiting for the server. To make an asynchronous request, evaluate() is preferred over getInfo().\n\nReturns the computed value of this object.\n\n| Usage | Returns |\n|------------------------------------|---------|\n| Dictionary.getInfo`(`*callback*`)` | Object |\n\n| Argument | Type | Details |\n|------------------------|--------------------|------------------------------------------------------------------------|\n| this: `computedobject` | ComputedObject | The ComputedObject instance. |\n| `callback` | Function, optional | An optional callback. If not supplied, the call is made synchronously. |\n\nExamples\n--------\n\n### Code Editor (JavaScript)\n\n```javascript\n// A dictionary (e.g. results of ee.Image.reduceRegion of an S2 image).\nvar dict = ee.Dictionary({\n B1: 182,\n B2: 219,\n B3: 443\n});\n\n// Request the server-side ee.Dictionary as a client-side object.\nprint('Client-side object', dict.getInfo());\nprint('Using the client-side object', Object.keys(dict.getInfo()).length);\n```\nPython setup\n\nSee the [Python Environment](/earth-engine/guides/python_install) page for information on the Python API and using\n`geemap` for interactive development. \n\n```python\nimport ee\nimport geemap.core as geemap\n```\n\n### Colab (Python)\n\n```python\n# A dictionary (e.g. results of ee.Image.reduceRegion of an S2 image).\ndic = ee.Dictionary({\n 'B1': 182,\n 'B2': 219,\n 'B3': 443\n})\n\n# Request the server-side ee.Dictionary as a client-side object.\nprint('Client-side object:', dic.getInfo())\nprint('Using the client-side object (e.g. fetch number of keys):',\n len(dic.getInfo().keys()))\n```"]]