ee.FeatureCollection.aggregate_max

Agrega una propiedad determinada de los objetos de una colección y calcula el máximo de los valores de la propiedad seleccionada.

UsoMuestra
FeatureCollection.aggregate_max(property)
ArgumentoTipoDetalles
esta: collectionFeatureCollectionEs la colección para agregar.
propertyStringEs la propiedad que se usará de cada elemento de la colección.

Ejemplos

Editor de código (JavaScript)

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

print('Max of power plant capacities (MW)',
      fc.aggregate_max('capacitymw'));  // 2910

Configuración de Python

Consulta la página Entorno de Python para obtener información sobre la API de Python y el uso de geemap para el desarrollo interactivo.

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('Max of power plant capacities (MW):',
      fc.aggregate_max('capacitymw').getInfo())  # 2910