semantique.mapping.Semantique.translate

semantique.mapping.Semantique.translate#

Semantique.translate(*reference, property=None, extent, datacube, eval_obj=None, **config)[source]#

Translate a semantic concept reference into a semantic array.

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. If None, 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 by parse_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 forwarded to the initializer of processor.core.QueryProcessor.

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.