aggregateArray#

geetools.ee_image_collection.ImageCollectionAccessor.aggregateArray(properties=None)#

Aggregate the ee.ImageCollection selected properties into a dictionary.

Parameters:

properties (list[str] | ee.List | None) – List of properties to aggregate. If None, all properties are aggregated.

Returns:

A dictionary with the properties as keys and the aggregated values as values.

Return type:

ee.Dictionary

Examples

import ee, geetools

ee.Initialize()

collection = (
    ee.ImageCollection("LANDSAT/LC08/C01/T1_TOA")
    .filterBounds(ee.Geometry.Point(-122.262, 37.8719))
    .filterDate("2014-01-01", "2014-12-31")
)

aggregated = collection.geetools.aggregateArray(["CLOUD_COVER", "system:time_start"])
print(aggregated.getInfo())