ee.FeatureCollection.aggregate_array

Agreguje dane dotyczące wybranej właściwości obiektów w kolekcji, obliczając listę wszystkich wartości tej właściwości.

WykorzystanieZwroty
FeatureCollection.aggregate_array(property)Lista
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('Power plant fuel sources',
      fc.aggregate_array('fuel1'));  // ee.List

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('Power plant fuel sources:',
      fc.aggregate_array('fuel1').getInfo())  # ee.List