preprocess#

abstract geetools.ImageAccessor.preprocess(**kwargs)#

Pre-processes the image: masks clouds and shadows, and scales and offsets the image.

Parameters:

**kwargs – Keywords arguments for ee.Image.geetools.maskClouds method.

Returns:

Pre-processed image.

Return type:

ee.Image

See also

  • getScaleParams: Gets the scale parameters for each band of the image.

  • getOffsetParams: Gets the offset parameters for each band of the image.

  • scaleAndOffset: Scales bands on an image according to their scale and offset parameters.

  • maskClouds: Masks clouds and shadows in an image (valid just for Surface Reflectance products).

Examples

import ee
import geetools

ee.Initialize()
S2 = (
    ee.ImageCollection('COPERNICUS/S2_SR').first()
    .geetools.preprocess()
)