eebit#
The init file of the package.
Submodules#
Attributes#
Classes#
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.
- 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:
- 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:
- 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
- bits = []#
- total#