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:
objectRaster type definition
Attributes
Pattern that enables to identify the bands in a product of this rastertype
Gets the list of all available channels
Format of the date in the product's name
Function that defines the mask of cloud from the raster band
Nodata value of the mask
Name of the raster type
Nodata value
Pattern that enables to identify products of this rastertype
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.
Gets the descriptions of the bands.
RasterType.get_band_id(channel)Gets the band identifier of the specified channel.
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.
Gets the descriptions of the masks
Gets the identifier of the masks
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.
Checks if the product type contains a mask.