Source code for eoreader.products.optical.pld_product

# -*- coding: utf-8 -*-
# Copyright 2022, SERTIT-ICube - France, https://sertit.unistra.fr/
# This file is part of eoreader project
#     https://github.com/sertit/eoreader
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
#     http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
"""
Pleiades products.
See `here <www.engesat.com.br/wp-content/uploads/PleiadesUserGuide-17062019.pdf>`_
for more information.
"""
import logging

from eoreader.bands import SpectralBand
from eoreader.bands import spectral_bands as spb
from eoreader.products import DimapProduct
from eoreader.stac import GSD, ID, NAME, WV_MAX, WV_MIN
from eoreader.utils import EOREADER_NAME

LOGGER = logging.getLogger(EOREADER_NAME)


[docs]class PldProduct(DimapProduct): """ Class of Pleiades products. See `here <www.engesat.com.br/wp-content/uploads/PleiadesUserGuide-17062019.pdf>`_ for more information. """ def _pre_init(self, **kwargs) -> None: """ Function used to pre_init the products (setting needs_extraction and so on) """ self._pan_res = 0.5 self._ms_res = 2.0 self._altitude = 698000 # Post init done by the super class super()._pre_init(**kwargs) def _map_bands(self) -> None: """ Map bands """ # Create spectral bands # https://www.intelligence-airbusds.com/automne/api/docs/v1.0/document/download/ZG9jdXRoZXF1ZS1kb2N1bWVudC01NTMxNw==/ZG9jdXRoZXF1ZS1maWxlLTU1MzE2/pleiades-brochure-2019.pdf pan = SpectralBand( eoreader_name=spb.PAN, **{NAME: "PAN", ID: 1, GSD: self._pan_res, WV_MIN: 470, WV_MAX: 830} ) blue = SpectralBand( eoreader_name=spb.BLUE, **{NAME: "BLUE", ID: 1, GSD: self._ms_res, WV_MIN: 460, WV_MAX: 530} ) green = SpectralBand( eoreader_name=spb.GREEN, **{NAME: "GREEN", ID: 2, GSD: self._ms_res, WV_MIN: 500, WV_MAX: 620} ) red = SpectralBand( eoreader_name=spb.RED, **{NAME: "RED", ID: 3, GSD: self._ms_res, WV_MIN: 590, WV_MAX: 710} ) nir = SpectralBand( eoreader_name=spb.NIR, **{NAME: "NIR", ID: 4, GSD: self._ms_res, WV_MIN: 740, WV_MAX: 940} ) self._map_bands_core(blue=blue, green=green, red=red, nir=nir, pan=pan) def _set_instrument(self) -> None: """ Set instrument Pleiades: https://earth.esa.int/eogateway/missions/pleiades """ # HiRI: High Resolution Imager self.instrument = "HiRI"