eebit#

The init file of the package.

Submodules#

Attributes#

Classes#

BitMask

Initialize a bitmask.

Package Contents#

class eebit.BitMask(bits, total=None)[source]#

Initialize a bitmask.

Parameters:
  • bits (list[BitGroup]) – a list of BitGroup.

  • total (int | None) – total number of bits. If None, it uses the maximum position of the last group + 1.

bit_values()[source]#

Get the list of bit values in the bitmask.

Return type:

list[str]

decode_to_columns(table, column)[source]#

Decode a column in a FeatureCollection into multiple columns.

Parameters:
  • table (ee.FeatureCollection) – the FeatureCollection to decode.

  • column (str) – the column to decode.

Returns:

A new FeatureCollection with one column per bit value in the bitmask.

Return type:

ee.FeatureCollection

decode_value(value)[source]#

Decode a value into its descriptions.

Parameters:

value (int) – the value to decode.

Returns:

A dict with the descriptions of the value, or None if not found.

Return type:

dict[str, str | None]

classmethod from_dict(bits_info)[source]#

Create a BitMask from a dict.

Parameters:

bits_info (dict)

Return type:

BitMask

get_group_by_description(description)[source]#

Get the BitGroup that match a given description.

Parameters:

description (str) – the description to search for.

Returns:

The BitGroup that match the given description.

Return type:

BitGroup

get_masks(image)[source]#

Get masks for all bit values in the bitmask.

Returns:

An image with one band per bit value in the bitmask.

Parameters:

image (ee.Image)

Return type:

ee.Image

to_dict()[source]#

Convert a Bitmask into a dict.

Return type:

dict

bits = []#
total#
eebit.__author__ = 'Rodrigo Principe'[source]#
eebit.__email__ = 'fitoprincipe82@gmail.com'[source]#
eebit.__version__ = '0.0.0'[source]#