ee.FeatureCollection.aggregate_array

Agrega uma determinada propriedade dos objetos em uma coleção, calculando uma lista de todos os valores da propriedade selecionada.

UsoRetorna
FeatureCollection.aggregate_array(property)Lista
ArgumentoTipoDetalhes
isso: collectionFeatureCollectionA coleção para agregar.
propertyStringA propriedade a ser usada de cada elemento da coleção.

Exemplos

Editor de código (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

Configuração do Python

Consulte a página Ambiente Python para informações sobre a API Python e como usar geemap para desenvolvimento interativo.

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