Skip to content

v1.9.0

Choose a tag to compare

@12rambau 12rambau released this 22 Nov 22:27
· 341 commits to main since this release
da87ffa

reduceRegion for image collections

In this release, we introduced a much wanted feature to our collection of tools. Using this version you'll be able to perform feature enrichment and perform reduceRegion operation directly on top of you image collections. We tried to cover as many traps you could meet in the way and provide something as simple as possible to compute the same reduceRegion operation you would do on an image but across the stack.

import ee, geetools 

## Import the example feature collection and drop the data property.
ecoregions = ee.FeatureCollection("projects/google/charts_feature_example").select(["label", "value", "warm"])


## Load MODIS vegetation indices data and subset of 4 images.
vegIndices = ee.ImageCollection("MODIS/061/MOD13A1").filter(ee.Filter.date("2010-01-01", "2010-02-28")).select(["NDVI", "EVI"])

vegIndices.geetools.reduceRegion(
    reducer = ee.Reducer.mean(),
    idProperty = "system:time_start",
    idPropertyType = ee.Date,
    geometry = ecoregions.filter(ee.Filter.eq("label", "Forest")).geometry(),
    scale = 500
).getInfo()
{
  "2010-01-01T00-00-00": {"EVI": 1906.640549923878, "NDVI": 3271.6286118599337},
  "2010-01-17T00-00-00": {"EVI": 3285.1954560181716, "NDVI": 7332.941022787698},
  "2010-02-02T00-00-00": {"EVI": 2973.249133365389, "NDVI": 7853.778045715129},
  "2010-02-18T00-00-00": {"EVI": 3278.830343157147, "NDVI": 7959.46303125494}
}

More information and example in the documentation.

What's Changed

Full Changelog: v1.8.0...v1.9.0