maskCoverRegions#
- geetools.ImageAccessor.maskCoverRegions(collection, scale=None, band=None, proxyValue=-999, columnName='mask_cover', **kwargs)#
Compute the coverage of masked pixels inside a Geometry.
- Parameters:
collection (ee.FeatureCollection) – The collection to compute the mask coverage (in each Feature).
scale (Optional[int | ee.Number]) – The scale of the computation. In case you need a rough estimation use a higher scale than the original from the image.
band (Optional[str | ee.String]) – The band to use. Defaults to the first band.
proxyValue (int | ee.Number) – the value to use for counting the mask and avoid confusing 0s to masked values. In most cases the user should not change this value, but in case of conflicts, choose a value that is out of the range of the image values.
columnName (str | ee.String) – name of the column that will hold the value.
- Return type:
- Kwargs:
tileScale: A scaling factor between 0.1 and 16 used to adjust aggregation tile size; setting a larger tileScale (e.g., 2 or 4) uses smaller tiles and may enable computations that run out of memory with the default.
- Returns:
The passed table with the new column containing the percentage of masked pixels within the region
- Parameters:
- Return type:
Examples
import ee, geetools ee.Initialize() image = ee.Image('COPERNICUS/S2_SR/20190828T151811_20190828T151809_T18GYT') reg = ee.Geometry.Point([11.880190936531116, 42.0159494554553]).buffer(2000) aoi = ee.FeatureCollection([ee.Feature(reg)]) image = image.maskCoverRegions(aoi)