Announcement: All noncommercial projects registered to use Earth Engine before April 15, 2025 must verify noncommercial eligibility to maintain access. If you have not verified by September 26, 2025, your access may be on hold.
Stay organized with collections
Save and categorize content based on your preferences.
To get image statistics in multiple regions stored in a FeatureCollection,
you can use image.reduceRegions() to reduce multiple regions at once.
The input to reduceRegions() is an Image and a
FeatureCollection. The output is another FeatureCollection
with the reduceRegions() output set as properties on each Feature.
In this example, means of the Landsat 7 annual composite bands in each feature geometry
will be added as properties to the input features:
Observe that new properties, keyed by band name, have been added to the
FeatureCollection to store the mean of the composite in each
Feature geometry. As a result, the output of the print statement should
look something like:
[[["Easy to understand","easyToUnderstand","thumb-up"],["Solved my problem","solvedMyProblem","thumb-up"],["Other","otherUp","thumb-up"]],[["Missing the information I need","missingTheInformationINeed","thumb-down"],["Too complicated / too many steps","tooComplicatedTooManySteps","thumb-down"],["Out of date","outOfDate","thumb-down"],["Samples / code issue","samplesCodeIssue","thumb-down"],["Other","otherDown","thumb-down"]],["Last updated 2025-01-02 UTC."],[[["\u003cp\u003e\u003ccode\u003eimage.reduceRegions()\u003c/code\u003e can be used to calculate statistics for an image within multiple regions defined by a \u003ccode\u003eFeatureCollection\u003c/code\u003e.\u003c/p\u003e\n"],["\u003cp\u003eThe output is a new \u003ccode\u003eFeatureCollection\u003c/code\u003e where each feature has new properties containing the calculated statistics.\u003c/p\u003e\n"],["\u003cp\u003eThis example demonstrates calculating the mean of Landsat 7 bands for each county in Maine.\u003c/p\u003e\n"],["\u003cp\u003eThe calculated statistics are added as properties to the original features, with band names as keys.\u003c/p\u003e\n"]]],["The core content explains how to use `image.reduceRegions()` to calculate image statistics across multiple regions. This method takes an `Image` and a `FeatureCollection` as input. It then outputs a new `FeatureCollection`, where each feature has the results of the reduction (e.g., mean) as properties. The example uses Landsat 7 data and Maine counties, calculating the mean of each band within each county's geometry and adding them as properties in the resulting feature.\n"],null,[]]