お知らせ:
2025 年 4 月 15 日より前に Earth Engine の使用を登録したすべての非商用プロジェクトは、Earth Engine へのアクセスを維持するために
非商用目的での利用資格を確認する必要があります。
ee.FeatureCollection.getInfo
コレクションでコンテンツを整理
必要に応じて、コンテンツの保存と分類を行います。
AJAX 呼び出しを介してこのコレクションに関する既知の情報をすべて返す命令型関数。
次のフィールドを含むコレクションの説明を返します。
- features: コレクション内の特徴に関するメタデータを含むリスト。
- properties: コレクションのメタデータ プロパティを含むオプションの辞書。
用途 | 戻り値 |
---|
FeatureCollection.getInfo(callback) | FeatureCollectionDescription |
引数 | タイプ | 詳細 |
---|
これ: featurecollection | FeatureCollection | FeatureCollection インスタンス。 |
callback | 関数(省略可) | オプションのコールバック。指定しない場合、呼び出しは同期的に行われます。指定された場合、成功した場合は最初のパラメータで、失敗した場合は 2 番目のパラメータで呼び出されます。 |
例
コードエディタ(JavaScript)
/**
* 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.FeatureCollection of power plants in Belgium.
var fcServer = ee.FeatureCollection('WRI/GPPD/power_plants')
.filter('country_lg == "Belgium"');
// Use getInfo to transfer server-side feature collection to the client. The
// result is an object.
var fcClient = fcServer.getInfo();
print('Client-side feature collection is an object', typeof fcClient);
print('Feature collection object keys', Object.keys(fcClient));
print('Array of features', fcClient.features);
print('Properties of first feature', fcClient.features[0].properties);
Python の設定
Python API とインタラクティブな開発での geemap
の使用については、
Python 環境のページをご覧ください。
import ee
import geemap.core as geemap
Colab(Python)
"""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.FeatureCollection of power plants in Belgium.
fc_server = ee.FeatureCollection('WRI/GPPD/power_plants').filter(
'country_lg == "Belgium"')
# Use getInfo to transfer server-side feature collection to the client. The
# result is an object.
fc_client = fc_server.getInfo()
print('Client-side feature collection is a dictionary:', type(fc_client))
print('Feature collection dictionary keys:', fc_client.keys())
print('Array of features:', fc_client['features'])
print('Properties of first feature:', fc_client['features'][0]['properties'])
特に記載のない限り、このページのコンテンツはクリエイティブ・コモンズの表示 4.0 ライセンスにより使用許諾されます。コードサンプルは Apache 2.0 ライセンスにより使用許諾されます。詳しくは、Google Developers サイトのポリシーをご覧ください。Java は Oracle および関連会社の登録商標です。
最終更新日 2025-07-26 UTC。
[null,null,["最終更新日 2025-07-26 UTC。"],[[["\u003cp\u003e\u003ccode\u003egetInfo()\u003c/code\u003e retrieves all data from a server-side FeatureCollection to the client as a FeatureCollectionDescription.\u003c/p\u003e\n"],["\u003cp\u003eThe returned FeatureCollectionDescription contains 'features' (metadata about features) and optional 'properties' (collection metadata).\u003c/p\u003e\n"],["\u003cp\u003eThis function can negatively impact performance due to client-side data transfer; server-side alternatives are preferred when feasible.\u003c/p\u003e\n"],["\u003cp\u003eUsage involves calling \u003ccode\u003eFeatureCollection.getInfo()\u003c/code\u003e with an optional callback function for asynchronous execution.\u003c/p\u003e\n"]]],[],null,["# ee.FeatureCollection.getInfo\n\n\u003cbr /\u003e\n\nAn imperative function that returns all the known information about this collection via an AJAX call.\n\n\u003cbr /\u003e\n\nReturns a collection description whose fields include:\n\n- features: a list containing metadata about the features in the collection.\n\n- properties: an optional dictionary containing the collection's metadata properties.\n\n| Usage | Returns |\n|-------------------------------------------|------------------------------|\n| FeatureCollection.getInfo`(`*callback*`)` | FeatureCollectionDescription |\n\n| Argument | Type | Details |\n|---------------------------|--------------------|---------------------------------------------------------------------------------------------------------------------------------------------------------------------------|\n| this: `featurecollection` | FeatureCollection | The FeatureCollection instance. |\n| `callback` | Function, optional | An optional callback. If not supplied, the call is made synchronously. If supplied, will be called with the first parameter if successful and the second if unsuccessful. |\n\nExamples\n--------\n\n### Code Editor (JavaScript)\n\n```javascript\n/**\n * WARNING: this function transfers data from Earth Engine servers to the\n * client. Doing so can negatively affect request processing and client\n * performance. Server-side options should be used whenever possible.\n * Learn more about the distinction between server and client:\n * https://developers.google.com/earth-engine/guides/client_server\n */\n\n// A server-side ee.FeatureCollection of power plants in Belgium.\nvar fcServer = ee.FeatureCollection('WRI/GPPD/power_plants')\n .filter('country_lg == \"Belgium\"');\n\n// Use getInfo to transfer server-side feature collection to the client. The\n// result is an object.\nvar fcClient = fcServer.getInfo();\nprint('Client-side feature collection is an object', typeof fcClient);\nprint('Feature collection object keys', Object.keys(fcClient));\nprint('Array of features', fcClient.features);\nprint('Properties of first feature', fcClient.features[0].properties);\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\"\"\"WARNING: this function transfers data from Earth Engine servers to the\nclient. Doing so can negatively affect request processing and client\nperformance. Server-side options should be used whenever possible.\nLearn more about the distinction between server and client:\nhttps://developers.google.com/earth-engine/guides/client_server\n\"\"\"\n\n# A server-side ee.FeatureCollection of power plants in Belgium.\nfc_server = ee.FeatureCollection('WRI/GPPD/power_plants').filter(\n 'country_lg == \"Belgium\"')\n\n# Use getInfo to transfer server-side feature collection to the client. The\n# result is an object.\nfc_client = fc_server.getInfo()\nprint('Client-side feature collection is a dictionary:', type(fc_client))\nprint('Feature collection dictionary keys:', fc_client.keys())\nprint('Array of features:', fc_client['features'])\nprint('Properties of first feature:', fc_client['features'][0]['properties'])\n```"]]