interpolateBands#
- geetools.ImageAccessor.interpolateBands(src, to)#
Interpolate bands from the
srcvalue range to thetovalue range.The Interpolation is performed linearly using the
extrapolateoption of theee.Image.interpolate()method.- Parameters:
- Returns:
The image with the interpolated bands
- Return type:
Examples
import ee, geetools ee.Initialize() vatican = ee.Geometry.Point([12.4534, 41.9033]).buffer(1) image = ee.ImageCollection('COPERNICUS/S2_SR_HARMONIZED').filterBounds(vatican).first() image = image.select(["B4", "B3", "B2"]).geetools.interpolateBands([0, 3000], [0, 30]) values = image.reduceRegion(ee.Reducer.mean(), vatican, 1) print(values.getInfo())