# -*-coding:utf-8-*- from pathlib import Path from collections import namedtuple from pprint import pprint, pformat from datetime import datetime import re # type annotations from typing import List, Set, Dict, Tuple, Optional from sen2chain import (Config, L1cProduct, L2aProduct, Tile, IndicesCollection, str_to_datetime) data = Path("data") t = Tile("38KQV") #print(t.l2a.last.date) #print(t.l2a.filter_by_cloud_cover(0,50)) #l1c = L1cProduct("S2A_MSIL1C_20180904T063511_N0206_R134_T40KCB_20180904T090928.SAFE") #print(l1c.in_library) class Library: """ """ _temp_path = Path(Config().get("temp_path")) _l1c_path = Path(Config().get("l1c_path")) _l2a_path = Path(Config().get("l2a_path")) _indices_path = Path(Config().get("indices_path")) def __init__(self) -> None: self._l1c_tiles = [f.name for f in self._l1c_path.glob("*")] self._l2a_tiles = [f.name for f in self._l2a_path.glob("*")] self._indices = [f.name for f in self._indices_path.glob("*")] @property def l1c_tiles(self): return self._l1c_tiles @property def l2a_tiles(self): return self._l2a_tiles @property def indices(self): return self._indicess print(Library().l_tiles)