ee.FeatureCollection.aggregate_product

Agreguje wartości wybranej właściwości obiektów w kolekcji, obliczając ich iloczyn.

WykorzystanieZwroty
FeatureCollection.aggregate_product(property)Liczba
ArgumentTypSzczegóły
to: collectionFeatureCollectionKolekcja, po której ma nastąpić agregacja.
propertyCiąg znakówWłaściwość do użycia z każdego elementu kolekcji.

Przykłady

Edytor kodu (JavaScript)

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

print('Product of power plant capacities (MW)',
      fc.aggregate_product('capacitymw'));  // 2.149198109e+109

Konfiguracja Pythona

Informacje o interfejsie Python API i używaniu geemap do interaktywnego programowania znajdziesz na stronie Środowisko 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('Product of power plant capacities (MW):',
      fc.aggregate_product('capacitymw').getInfo())  # 2.149198109e+109