implement a abstract RasterMetadataInterface class thats specifies a unified interface for raster metadata handling

Issue #909 on hold
Andreas Janz created an issue

Requested by @Benjamin Jakimow .

The class basically defines the interface for the proposed QGIS PAM, Spectral Properties and Temporal Properties described in RFC 1-3:
https://enmap-box.readthedocs.io/en/latest/dev_section/rfc_list/index.html

Comments (4)

  1. Andreas Janz reporter

    @Benjamin Jakimow here is the first version.

    from typing import List, Optional
    
    from enmapboxprocessing.typing import Metadata, MetadataValue, MetadataDomain
    from typeguard import typechecked
    
    
    @typechecked
    class RasterMetadataInterface(object):
    
        def metadataItem(self, key: str, domain: str = '', bandNo: int = None) -> Optional[MetadataValue]:
            raise NotImplementedError()
    
        def metadataDomain(self, domain: str = '', bandNo: int = None) -> MetadataDomain:
            raise NotImplementedError()
    
        def metadata(self, bandNo: int = None) -> Metadata:
            raise NotImplementedError()
    
        def metadataDomainKeys(self, bandNo: int = None) -> List[str]:
            raise NotImplementedError()
    
        def setMetadataItem(self, key: str, value: MetadataValue, domain: str = '', bandNo: int = None):
            raise NotImplementedError()
    
        def wavelength(self, bandNo: int, units: str = None) -> Optional[float]:
            raise NotImplementedError()
    
        def wavelengthUnits(self, bandNo: int) -> Optional[str]:
            raise NotImplementedError()
    
        def fwhm(self, bandNo: int, units: str = None) -> Optional[float]:
            raise NotImplementedError()
    
        def badBandMultiplier(self, bandNo: int) -> int:
            raise NotImplementedError()
    

  2. Andreas Janz reporter

    Not quite sure if this is useful for you. Feel free to add/change at your own will. I have the feeling that I won’t need the interface class at all.

  3. Log in to comment