Newer
Older
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
# -*-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)