RasterType

class eolab.georastertools.product.rastertype.RasterType(name: str, product_pattern: str, bands_pattern: str, bands: Dict[BandChannel, Band], masks: List[Band], date_format: str = '%Y%m%d-%H%M%S', maskfunc: str | None = None, nodata: float = -10000, masknodata: int = 1)[source]

Bases: object

Raster type definition

Attributes

RasterType.bands_pattern

Pattern that enables to identify the bands in a product of this rastertype

RasterType.channels

Gets the list of all available channels

RasterType.date_format

Format of the date in the product's name

RasterType.maskfunc

Function that defines the mask of cloud from the raster band

RasterType.masknodata

Nodata value of the mask

RasterType.name

Name of the raster type

RasterType.nodata

Nodata value

RasterType.product_pattern

Pattern that enables to identify products of this rastertype

RasterType.rastertypes

Methods

RasterType.__init__(name, product_pattern, ...)

Constructor

RasterType.accept(file)

Check if the file corresponds to this raster type

RasterType.add(rastertypes)

Add new raster types definitions from a json file

RasterType.find(file)

Gets the raster type corresponding to the input file

RasterType.get(name)

Get the raster type by its name

RasterType.get_band_description(channel)

Gets the band description of the given channel.

RasterType.get_band_descriptions()

Gets the descriptions of the bands.

RasterType.get_band_id(channel)

Gets the band identifier of the specified channel.

RasterType.get_band_ids()

Gets the bands identifiers.

RasterType.get_bands_regexp([channels])

Gets the regexp to identify the bands in the product.

RasterType.get_date(file)

Extracts the timestamp of the raster from the input file

RasterType.get_group(file, group)

Extracts a group from the input file using the product pattern

RasterType.get_mask(mask_id)

Gets the mask corresponding to the given id.

RasterType.get_mask_descriptions()

Gets the descriptions of the masks

RasterType.get_mask_ids()

Gets the identifier of the masks

RasterType.get_mask_regexp()

Gets the regexp to identify the masks

RasterType.has_channel(channel)

Checks if the product type contains the expected channel.

RasterType.has_channels(channels)

Checks if the product type contains all the expected channels.

RasterType.has_mask()

Checks if the product type contains a mask.