semantique.processor.arrays.Collection.merge

semantique.processor.arrays.Collection.merge#

Collection.merge(reducer, track_types=True, **kwargs)[source]#

Apply the merge verb to the collection.

The merge verb merges the pixel values of all arrays in the collection into a single value per pixel.

Parameters:
  • reducer (str) – Name of the reducer function to be applied in order to reduce multiple values per pixel into a single value. Should either be one of the built-in reducers of semantique, or a user-defined reducer which will be provided to the query processor when executing the query recipe.

  • track_types (bool) – Should it be checked if all arrays in the collection have the same value type, and should the reducer promote the value type of the output object, based on the value type of the input objects?

  • **kwargs – Additional keyword arguments passed on to the reducer function.

Returns:

xarray.DataArray

Raises:

exceptions.InvalidValueTypeError – If track_types = True and the value types of the arrays in the collection are not all equal to each other.