semantique.CollectionProxy.compose

semantique.CollectionProxy.compose#

CollectionProxy.compose(**kwargs)[source]#

Create a categorical composition of multiple binary arrays.

The categorical composition contains a value of 1 for each pixel being “true” in the first array of the collection, a value of 2 for each pixel being “true” in the second array of the collection, et cetera. If a pixel is “true” in more than one array of the collection, the first of those is prioritized. If a pixel is not “true” in any array of the collection it gets assigned a nodata value.

Parameters:

**kwargs – Additional keyword arguments passed on to Collection.compose.

Returns:

ArrayProxy

Examples

>>> import semantique as sq
>>> sq.collection(sq.entity("water"), sq.entity("ice")).compose()