ee.FeatureCollection.aggregate_first

コレクション内のオブジェクトの特定のプロパティを集計し、コレクション内の最初のオブジェクトのプロパティ値を計算します。

用途戻り値
FeatureCollection.aggregate_first(property)
引数タイプ詳細
これ: collectionFeatureCollection集計するコレクション。
property文字列コレクションの各要素から使用するプロパティ。

コードエディタ(JavaScript)

// FeatureCollection of power plants in Belgium.
var fc = ee.FeatureCollection('WRI/GPPD/power_plants')
             .filter('country_lg == "Belgium"');

print('Fuel source for first power plant in the collection',
      fc.aggregate_first('fuel1'));  // Wind

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"')

print('Fuel source for first power plant in the collection:',
      fc.aggregate_first('fuel1').getInfo())  # Wind