Apply a reducer over the area of each feature in the given collection.
The reducer must have the same number of inputs as the input image has bands.
Returns the input features, each augmented with the corresponding reducer outputs.
Usage | Returns |
---|---|
Image.reduceRegions(collection, reducer, scale, crs, crsTransform, tileScale) | FeatureCollection |
Argument | Type | Details |
---|---|---|
this: image | Image | The image to reduce. |
collection | FeatureCollection | The features to reduce over. |
reducer | Reducer | The reducer to apply. |
scale | Float, default: null | A nominal scale in meters of the projection to work in. |
crs | Projection, default: null | The projection to work in. If unspecified, the projection of the image's first band is used. If specified in addition to scale, rescaled to the specified scale. |
crsTransform | List, default: null | The list of CRS transform values. This is a row-major ordering of the 3x2 transform matrix. This option is mutually exclusive with 'scale', and will replace any transform already set on the projection. |
tileScale | Float, default: 1 | A scaling factor used to reduce aggregation tile size; using a larger tileScale (e.g. 2 or 4) may enable computations that run out of memory with the default. |