ImageAccessor#

class geetools.ee_image.ImageAccessor(obj)#

Toolbox for the ee.Image class.

Initialize the Image class.

Parameters:

obj (ee.Image)

Methods#

addDate([format])

Add a band with the date of the image in the provided format.

addPrefix(prefix[, bands])

Add a prefix to the image selected band.

addSuffix(suffix[, bands])

Add a suffix to the image selected band.

bufferMask([radius, kernelType, units])

Make a buffer around every masked pixel of the Image.

byBands(regions[, reducer, bands, regionId, labels, ...])

Compute a reducer for each band of the image in each region.

byRegions(regions[, reducer, bands, regionId, labels, ...])

Compute a reducer in each region of the image for eah band.

classMask(class_info[, classes, band])

Create a mask using the class information.

classToBands(class_info[, band])

Convert each class into a separate binary mask.

clipOnCollection(fc[, keepProperties])

Clip an image to a ee.FeatureCollection.

distance(other)

Compute the sum of all spectral distance between two images.

distanceToMask(mask[, kernel, radius, band_name])

Compute the distance from each pixel to the nearest non-masked pixel.

doyToDate(year[, dateFormat, band])

Convert the DOY band to a date band.

format(string[, dateFormat])

Create a string from using the given pattern and using the image properties.

fromList(images)

Create a single image by passing a list of images.

full([values, names])

Create an image with the given values and names.

fullLike(fillValue[, copyProperties, keepMask, ...])

Create an image with the same band names, projection and scale as the original image.

gauss([band])

Apply a gaussian filter to the image.

getCitation()

Gets the citation of the image, if available.

getDOI()

Gets the DOI of the image, if available.

getOffsetParams()

Gets the offset parameters for each band of the image.

getSTAC()

Gets the STAC of the image.

getScaleParams()

Gets the scale parameters for each band of the image.

getValues(point[, scale])

Get the value of the image at the given point using specified geometry.

index_list()

Return the list of indices implemented in this module.

interpolateBands(src, to)

Interpolate bands from the src value range to the to value range.

isletMask(offset)

Compute the islet mask from an image.

maskClouds([method, prob, maskCirrus, maskShadows, ...])

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

maskCover([scale, proxyValue, propertyName])

Compute the percentage of masked pixels inside the image.

maskCoverRegion(region[, scale, band, proxyValue])

Compute the coverage of masked pixels inside a Geometry.

maskCoverRegions(collection[, scale, band, ...])

Compute the coverage of masked pixels inside a Geometry.

matchHistogram(target, bands[, geometry, maxBuckets, ...])

Adjust the image's histogram to match a target image.

merge(images)

Merge images into a single image.

minScale()

Return the minimum scale of the image.

negativeClip(geometry)

The opposite of the clip method.

panSharpen([method, qa])

Apply panchromatic sharpening to the Image.

plot(bands, region[, ax, fc, cmap, crs, scale, color])

Plot the image on a matplotlib axis.

plot_by_bands(type, regions[, reducer, bands, ...])

Plot the reduced values for each band.

plot_by_regions(type, regions[, reducer, bands, ...])

Plot the reduced values for each region.

plot_hist([bins, region, bands, labels, colors, ...])

Plot the histogram of the image bands.

preprocess(**kwargs)

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

reduceBands(reducer[, bands, name])

Reduce the image using the selected reducer and adding the result as a band using the selected name.

remove(bands)

Remove bands from the image.

removeProperties(properties)

Remove a list of properties from an image.

removeZeros()

Return an image array with non-zero values extracted from each band.

rename(names)

Rename the bands of the image based on a dictionary.

repeat(band, repeats)

Repeat a band of the image.

scaleAndOffset()

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

spectralIndices([index, G, C1, C2, L, cexp, nexp, ...])

Computes one or more spectral indices (indices are added as bands) for an image from the Awesome List of Spectral Indices.

tasseledCap()

Calculates tasseled cap brightness, wetness, and greenness components.

toGrid([size, band, geometry])

Convert an image to a grid of polygons.