geetools.ImageAccessor.negativeClip#
- geetools.ImageAccessor.negativeClip(geometry)#
The opposite of the clip method.
The inside of the geometry will be masked from the image.
- Parameters:
geometry (geetools.types.ee_geomlike) – The geometry to mask from the image.
- Returns:
The image with the geometry masked.
- Return type:
ee.Image
Examples
import ee, geetools ee.Initialize() src, bands = "COPERNICUS/S2_SR_HARMONIZED", ["B1", "B2", "B3"] vatican = ee.Geometry.Point([12.4534, 41.9033]).buffer(1) image = ee.ImageCollection(src).filterBounds(vatican).first().select(bands) image = image.geetools.negativeClip(vatican) print(image.reduceRegion(ee.Reducer.mean(), vatican, 1).getInfo())