geestac.bands#

Module for bands.

Classes#

Band

General Band class.

Bit

Initialize a Bit.

BitBand

Bit Band (bits mask).

BitGroup

Initialize a bit group.

Bitmask

Initialize a bitmask.

CategoricalBand

Categorical Band.

Category

Initialize a category.

OpticalBand

Optical Band.

Module Contents#

class geestac.bands.Band(name, scale, description, range=None)[source]#

General Band class.

Parameters:
  • name (str) – name of the band.

  • scale (int | float) – spatial resolution.

  • description (str) – description of the band.

  • range (dict | None) – range of the values.

__repr__()[source]#

Object representation.

_range = None[source]#
description[source]#
property estimated_range: bool | None[source]#

If range exists in STAC, return whether the range is estimated or not.

Return type:

bool | None

property maximum_value: int | float | None[source]#

If exists in the STAC, return the maximum value.

Return type:

int | float | None

property minimum_value: int | float | None[source]#

If exists in the STAC, return the minimum value.

Return type:

int | float | None

name[source]#
scale[source]#
class geestac.bands.Bit(value, description)[source]#

Initialize a Bit.

Parameters:
  • value (int) – value of the bit.

  • description (str) – description of the bit.

description[source]#
value[source]#
class geestac.bands.BitBand(name, scale, description, bitmask)[source]#

Bases: Band

Bit Band (bits mask).

Parameters:
  • name (str) – name of the band.

  • scale (int | float) – spatial resolution.

  • description (str) – description of the band.

  • bitmask (Bitmask) – the bit mask.

bitmask[source]#
class geestac.bands.BitGroup(first, count, description, bits)[source]#

Initialize a bit group.

Parameters:
  • first (int) – first bit.

  • count (int) – number of bits.

  • description (str) – description of the bit information.

  • bits (geestac.custom_types.ListNamespace[Bit]) – a ListNamespace of Bit objects.

to_dict()[source]#

Convert a bit group to a dict.

Return type:

dict

bits[source]#
count[source]#
description[source]#
first[source]#
class geestac.bands.Bitmask(parts, total)[source]#

Initialize a bitmask.

Parameters:
to_dict()[source]#

Convert a Bitmask into a dict.

Return type:

dict

parts[source]#
total[source]#
class geestac.bands.CategoricalBand(name, scale, description, class_info)[source]#

Bases: Band

Categorical Band.

Parameters:
  • name (str) – name of the band.

  • scale (int | float) – spatial resolution.

  • description (str) – description of the band.

  • class_info (geestac.custom_types.ListNamespace[Category]) – a ListNamespace with the class value as keys and the class names as values.

class_info[source]#
class geestac.bands.Category(value, description, color=None)[source]#

Initialize a category.

Parameters:
  • value (int) – value of the category.

  • description (str) – description of the category.

  • color (str | None) – color associated to the category (optional).

color = None[source]#
description[source]#
value[source]#
class geestac.bands.OpticalBand(name, scale, description, center_wavelength=None, offset=None, multiplier=None, range=None)[source]#

Bases: Band

Optical Band.

Parameters:
  • name (str) – name of the band.

  • scale (int | float) – spatial resolution.

  • description (str) – description of the band.

  • center_wavelength (int | float | None) – center wavelength.

  • offset (int | float | None) – value to “move” the raw value.

  • multiplier (int | float | None) – value to “multiply” the raw value (GEE calls this value ‘scale’)

  • range (dict | None) – range of the values.

center_wavelength = None[source]#
multiplier = None[source]#
offset = None[source]#