eodal.core.utils.sentinel2 module¶
Helper functions to read Sentinel-2 TCI (RGB quicklook) and Scene Classification Layer (SCL) file from a .SAFE dataset.
Copyright (C) 2022 Lukas Valentin Graf
This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version.
This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.
You should have received a copy of the GNU General Public License along with this program. If not, see <http://www.gnu.org/licenses/>.
- eodal.core.utils.sentinel2.read_s2_sclfile(in_dir: Path, in_file_aoi: Path | None = None) Sentinel2[source]¶
Reads the Sentinel-2 scene classification layer (SCL) file from a dataset in .SAFE format.
Attention
The SCL file is available in Level-2 processing level, only
- Parameters:
in_dir – .SAFE Sentinel-2 archive in Level-2A
in_file_aoi – optional vector geometry file defining an area of interest (AOI). If not provided, the entire spatial extent of the scene is read
- Returns:
RasterCollectionwith SCL band data
- eodal.core.utils.sentinel2.read_s2_tcifile(in_dir: Path, in_file_aoi: Path | None = None) Sentinel2[source]¶
Reads the Sentinel-2 RGB quicklook file from a data set in .SAFE format (processing levels L1C and L2A)
- Parameters:
in_dir – path to .SAFE Sentinel-2 archive
in_file_aoi – optional vector geometry file defining an area of interest (AOI). If not provided, the entire spatial extent of the scene is read
- Returns:
RasterCollectionwith quicklook band data