clipOnCollection#
- geetools.ImageAccessor.clipOnCollection(fc, keepProperties=1)#
Clip an image to a
ee.FeatureCollection.The image will be clipped to every single features of the
featureCollectionas one independent image.- Parameters:
fc (ee.FeatureCollection) – The
ee.FeatureCollectionto clip to.keepProperties (int | ee.Number) – If True, the properties of the
ee.FeatureCollectionwill be added to the clipped image.
- Returns:
The clipped
ee.ImageCollection.- Return type:
Examples
import ee, geetools ee.Initialize() src = 'COPERNICUS/S2_SR_HARMONIZED/20200101T100319_20200101T100321_T32TQM' image = ee.Image(src) fc = ee.FeatureCollection('FAO/GAUL/2015/level0') clipped = image.geetools.clipOnCollection(fc) print(clipped.size().getInfo())