semantique.mapping.Mapping.translate#
- abstract Mapping.translate(*reference, property=None, extent, datacube, eval_obj=None, **config)[source]#
Abstract method for the translator function.
- Parameters:
*reference – The index of the semantic concept in the mapping dictionary.
property (
str
) – Name of a property of the referenced semantic concept. If given, only this property of the semantic concept is translated. IfNone
, all properties of the semantic concept are translated and combined into a single semantic array by a logical “and” operator.extent (
xarray.DataArray
) – Spatio-temporal extent in which the semantic concept should be translated. Should be given as an array with a temporal dimension and two spatial dimensions, such as returned byparse_extent
. The translated semantic concept will have the same extent.datacube (
Datacube
) – The datacube instance to be used for data retrieval.eval_obj (
xarray.DataArray
) – The array to refer to when the mapping rules of the semantic concept contain processing chains that start with a self reference.**config – Additional keyword arguments.
- Returns:
xarray.DataArray
– The translated semantic concept, or property of a semantic concept, as an array. For each pixel it contains the quantified relation between the semantic concept and the data values in the datacube.