ImageCollectionAccessor#

class geetools.ee_image_collection.ImageCollectionAccessor(obj)#

Toolbox for the ee.ImageCollection class.

Instantiate the class.

Parameters:

obj (ee.ImageCollection)

Methods#

aggregateArray([properties])

Aggregate the ImageCollection selected properties into a dictionary.

append(image)

Append an image to the existing image collection.

closest(date[, tolerance, unit])

Gets the closest image (or set of images if the collection intersects a region that requires multiple scenes) to the specified date.

closestDate()

Fill masked pixels with the first valid pixel in the stack of images.

collectionMask()

A binary ee.Image where only pixels that are masked in all images of the collection get masked.

containsAllBands(bandNames)

Filter the ImageCollection keeping only the images with all the provided bands.

containsAnyBands(bandNames)

Filter the ImageCollection keeping only the images with any of the provided bands.

containsBandNames(bandNames, filter)

Filter the ImageCollection by band names using the provided filter.

datesByBands(region[, reducer, dateProperty, bands, ...])

Reduce the data for each image in the collection by bands on a specific region.

datesByRegions(band, regions[, label, reducer, ...])

Reduce the data for each image in the collection by regions for a single band.

doyByBands(region[, spatialReducer, timeReducer, ...])

Aggregate the images that occurs on the same day and then reduce each band on a single region.

doyByRegions(band, regions[, label, spatialReducer, ...])

Aggregate the images that occurs on the same day and then reduce a single band on multiple regions.

doyBySeasons(band, region, seasonStart, seasonEnd[, ...])

Aggregate for each year on a single region a single band.

doyByYears(band, region[, reducer, dateProperty, ...])

Aggregate for each year on a single region a single band.

getCitation()

Gets the citation of the image, if available.

getDOI()

Gets the DOI of the collection, 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.

groupInterval([unit, duration])

Transform the ImageCollection into a list of smaller collection of the specified duration.

iloc(index)

Get Image from the ImageCollection by index.

integral(band[, time, unit])

Compute the integral of a band over time or a specified property.

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

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

medoid()

Compute the medoid of the ImageCollection.

outliers([bands, sigma, drop])

Compute the outlier for each pixel in the specified bands.

panSharpen([method, qa])

Apply panchromatic sharpening to the ImageCollection images.

plot_dates_by_bands(region[, reducer, dateProperty, ...])

Plot the reduced data for each image in the collection by bands on a specific region.

plot_dates_by_regions(band, regions[, label, reducer, ...])

Plot the reduced data for each image in the collection by regions for a single band.

plot_doy_by_bands(region[, spatialReducer, ...])

Plot the reduced data for each image in the collection by bands on a specific region.

plot_doy_by_regions(band, regions[, label, ...])

Plot the reduced data for each image in the collection by regions for a single band.

plot_doy_by_seasons(band, region, seasonStart, seasonEnd)

Plot the reduced data for each image in the collection by years for a single band.

plot_doy_by_years(band, region[, reducer, ...])

Plot the reduced data for each image in the collection by years for a single band.

preprocess(**kwargs)

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

reduceInterval([reducer, unit, duration])

Reduce the images included in the same duration interval using the provided reducer.

reduceRegion(reducer, geometry[, idProperty, idType, ...])

Apply a reducer to all the pixels in a specific region on each image of the collection.

reduceRegions(reducer, collection[, idProperty, ...])

Apply a reducer to all the pixels in specific regions on each images of a collection.

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.

to_xarray([drop_variables, io_chunks, n_images, ...])

Open an Earth Engine ImageCollection as an xarray.Dataset.

validPixel([band])

Compute the number of valid pixels in the specified band.