geedim.collection.MaskedCollection.composite

MaskedCollection.composite(method: CompositeMethod | str = None, mask: bool = True, resampling: ResamplingMethod | str = None, date: datetime | str = None, region: dict = None, **kwargs) MaskedImage

Create a composite image from the encapsulated image collection.

Parameters:
  • method (CompositeMethod, str, optional) – Method for finding each composite pixel from the stack of corresponding input image pixels. See CompositeMethod for available options. By default, q-mosaic is used for cloud/shadow mask supported collections, mosaic otherwise.

  • mask (bool, optional) – Whether to apply the cloud/shadow mask; or fill (valid pixel) mask, in the case of images without support for cloud/shadow masking.

  • resampling (ResamplingMethod, str, optional) – Resampling method to use on collection images prior to compositing. If None, near resampling is used (the default). See ResamplingMethod for available options.

  • date (datetime, str, optional) – Sort collection images by their absolute difference in capture time from this date. Useful for prioritising pixels from images closest to this date. Valid for the q-mosaic, mosaic and medoid method only. If None, no time difference sorting is done (the default).

  • region (dict, optional) – Sort collection images by the portion of their pixels that are cloudless, and inside this geojson polygon. This is useful to prioritise pixels from the least cloudy image(s). Valid for the q-mosaic mosaic, and medoid method only. If collection has no cloud/shadow mask support, images are sorted by the portion of their pixels that are valid, and inside region. If None, no cloudless/valid portion sorting is done (the default). If date and region are not specified, collection images are sorted by their capture date.

  • **kwargs – Optional cloud/shadow masking parameters - see geedim.mask.MaskedImage.__init__() for details.

Returns:

Composite image.

Return type:

MaskedImage