semantique.ArrayProxy.assign_space

semantique.ArrayProxy.assign_space#

ArrayProxy.assign_space(component=None, **kwargs)[source]#

Assign spatial coordinates as values to the pixels in an array.

This verb is a shortcut for first extracting the spatial dimension with the extract() verb (optionally only a specific component of that dimension, such as the spatial feature indices), and then using the coordinates of this dimension as values to be assigned by the assign() verb.

Parameters:
  • component (str, optional) – Name of a specific component of the spatial dimension coordinates to be extracted, e.g. feature.

  • **kwargs – Additional keyword arguments passed on to Array.assign.

Returns:

CollectionProxy

Examples

>>> import semantique as sq
>>> sq.entity("water").assign_space()
>>> sq.entity("water").assign_space("feature")