お知らせ:
2025 年 4 月 15 日より前に Earth Engine の使用を登録したすべての非商用プロジェクトは、Earth Engine へのアクセスを維持するために
非商用目的での利用資格を確認する必要があります。
ee.FeatureCollection.getDownloadURL
コレクションでコンテンツを整理
必要に応じて、コンテンツの保存と分類を行います。
ダウンロード URL を取得します。URL にアクセスすると、FeatureCollection が複数の形式のいずれかでダウンロードされます。
コールバックが指定されている場合は、ダウンロード URL を返します。指定されていない場合は、undefined を返します。
用途 | 戻り値 |
---|
FeatureCollection.getDownloadURL(format, selectors, filename, callback) | Object|String |
引数 | タイプ | 詳細 |
---|
これ: featurecollection | FeatureCollection | FeatureCollection インスタンス。 |
format | 文字列、省略可 | ダウンロードの形式(「csv」、「json」、「geojson」、「kml」、「kmz」のいずれか)。「json」は GeoJSON を出力します。指定しない場合、デフォルトは「csv」です。 |
selectors | List<String>|String(省略可) | ダウンロードする属性を選択するために使用される特徴プロパティ名。指定しない場合は、すべてのプロパティが含まれます。 |
filename | 文字列、省略可 | ダウンロードするファイルの名前。デフォルトで拡張子が追加されます。指定しない場合、デフォルトは「table」です。 |
callback | 関数(省略可) | オプションのコールバック。指定しない場合、呼び出しは同期的に行われます。 |
例
コードエディタ(JavaScript)
// FeatureCollection of power plants in Belgium.
var fc = ee.FeatureCollection('WRI/GPPD/power_plants')
.filter('country_lg == "Belgium"');
// Get a download URL for the FeatureCollection.
var downloadUrl = fc.getDownloadURL({
format: 'CSV',
selectors: ['capacitymw', 'fuel1'],
filename: 'belgian_power_plants'
});
print('URL for downloading FeatureCollection as CSV', downloadUrl);
Python の設定
Python API とインタラクティブな開発での geemap
の使用については、
Python 環境のページをご覧ください。
import ee
import geemap.core as geemap
Colab(Python)
# FeatureCollection of power plants in Belgium.
fc = ee.FeatureCollection('WRI/GPPD/power_plants').filter(
'country_lg == "Belgium"')
# Get a download URL for the FeatureCollection.
download_url = fc.getDownloadURL(**{
'filetype': 'CSV',
'selectors': ['capacitymw', 'fuel1'],
'filename': 'belgian_power_plants',
})
print('URL for downloading FeatureCollection as CSV:', download_url)
特に記載のない限り、このページのコンテンツはクリエイティブ・コモンズの表示 4.0 ライセンスにより使用許諾されます。コードサンプルは Apache 2.0 ライセンスにより使用許諾されます。詳しくは、Google Developers サイトのポリシーをご覧ください。Java は Oracle および関連会社の登録商標です。
最終更新日 2025-07-25 UTC。
[null,null,["最終更新日 2025-07-25 UTC。"],[],["The `FeatureCollection.getDownloadURL` method generates a URL for downloading a FeatureCollection in various formats (CSV, JSON, GeoJSON, KML, KMZ). Users can specify the `format`, `selectors` (properties to include), and `filename`. If a `callback` function is used, the method returns `undefined`. If not, it will return the download URL synchronously. If format and filename are not specified, they default to CSV and \"table\" respectively, all properties are included.\n"],null,[]]