mapchete-eo 2025.10.1__py2.py3-none-any.whl → 2026.1.0__py2.py3-none-any.whl
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- mapchete_eo/__init__.py +1 -1
- mapchete_eo/base.py +94 -54
- mapchete_eo/cli/options_arguments.py +11 -27
- mapchete_eo/cli/s2_brdf.py +1 -1
- mapchete_eo/cli/s2_cat_results.py +4 -20
- mapchete_eo/cli/s2_find_broken_products.py +4 -20
- mapchete_eo/cli/s2_jp2_static_catalog.py +2 -2
- mapchete_eo/cli/static_catalog.py +4 -45
- mapchete_eo/eostac.py +1 -1
- mapchete_eo/io/assets.py +20 -16
- mapchete_eo/io/items.py +36 -23
- mapchete_eo/io/path.py +19 -8
- mapchete_eo/io/products.py +22 -24
- mapchete_eo/platforms/sentinel2/__init__.py +1 -1
- mapchete_eo/platforms/sentinel2/_mapper_registry.py +89 -0
- mapchete_eo/platforms/sentinel2/brdf/correction.py +1 -1
- mapchete_eo/platforms/sentinel2/brdf/hls.py +1 -1
- mapchete_eo/platforms/sentinel2/brdf/models.py +1 -1
- mapchete_eo/platforms/sentinel2/brdf/protocols.py +1 -1
- mapchete_eo/platforms/sentinel2/brdf/ross_thick.py +1 -1
- mapchete_eo/platforms/sentinel2/brdf/sun_angle_arrays.py +1 -1
- mapchete_eo/platforms/sentinel2/config.py +73 -13
- mapchete_eo/platforms/sentinel2/driver.py +0 -39
- mapchete_eo/platforms/sentinel2/metadata_parser/__init__.py +6 -0
- mapchete_eo/platforms/sentinel2/{path_mappers → metadata_parser}/base.py +1 -1
- mapchete_eo/platforms/sentinel2/{path_mappers/metadata_xml.py → metadata_parser/default_path_mapper.py} +2 -2
- mapchete_eo/platforms/sentinel2/metadata_parser/models.py +78 -0
- mapchete_eo/platforms/sentinel2/{metadata_parser.py → metadata_parser/s2metadata.py} +51 -144
- mapchete_eo/platforms/sentinel2/preconfigured_sources/__init__.py +57 -0
- mapchete_eo/platforms/sentinel2/preconfigured_sources/guessers.py +108 -0
- mapchete_eo/platforms/sentinel2/preconfigured_sources/item_mappers.py +171 -0
- mapchete_eo/platforms/sentinel2/preconfigured_sources/metadata_xml_mappers.py +217 -0
- mapchete_eo/platforms/sentinel2/preprocessing_tasks.py +22 -1
- mapchete_eo/platforms/sentinel2/processing_baseline.py +3 -0
- mapchete_eo/platforms/sentinel2/product.py +83 -18
- mapchete_eo/platforms/sentinel2/source.py +114 -0
- mapchete_eo/platforms/sentinel2/types.py +5 -0
- mapchete_eo/product.py +14 -8
- mapchete_eo/protocols.py +5 -0
- mapchete_eo/search/__init__.py +3 -3
- mapchete_eo/search/base.py +127 -99
- mapchete_eo/search/config.py +75 -4
- mapchete_eo/search/s2_mgrs.py +8 -9
- mapchete_eo/search/stac_search.py +99 -97
- mapchete_eo/search/stac_static.py +46 -102
- mapchete_eo/search/utm_search.py +54 -62
- mapchete_eo/settings.py +1 -0
- mapchete_eo/sort.py +4 -6
- mapchete_eo/source.py +107 -0
- {mapchete_eo-2025.10.1.dist-info → mapchete_eo-2026.1.0.dist-info}/METADATA +4 -3
- mapchete_eo-2026.1.0.dist-info/RECORD +89 -0
- {mapchete_eo-2025.10.1.dist-info → mapchete_eo-2026.1.0.dist-info}/WHEEL +1 -1
- {mapchete_eo-2025.10.1.dist-info → mapchete_eo-2026.1.0.dist-info}/entry_points.txt +1 -1
- {mapchete_eo-2025.10.1.dist-info → mapchete_eo-2026.1.0.dist-info}/licenses/LICENSE +1 -1
- mapchete_eo/archives/__init__.py +0 -0
- mapchete_eo/archives/base.py +0 -65
- mapchete_eo/geometry.py +0 -271
- mapchete_eo/known_catalogs.py +0 -42
- mapchete_eo/platforms/sentinel2/archives.py +0 -190
- mapchete_eo/platforms/sentinel2/path_mappers/__init__.py +0 -29
- mapchete_eo/platforms/sentinel2/path_mappers/earthsearch.py +0 -34
- mapchete_eo/platforms/sentinel2/path_mappers/sinergise.py +0 -105
- mapchete_eo-2025.10.1.dist-info/RECORD +0 -88
|
@@ -1,190 +0,0 @@
|
|
|
1
|
-
from __future__ import annotations
|
|
2
|
-
|
|
3
|
-
from enum import Enum
|
|
4
|
-
from typing import Any, Type
|
|
5
|
-
|
|
6
|
-
from mapchete.path import MPath
|
|
7
|
-
from pydantic import ValidationError
|
|
8
|
-
from pydantic.functional_validators import BeforeValidator
|
|
9
|
-
from pystac import Item
|
|
10
|
-
from typing_extensions import Annotated
|
|
11
|
-
|
|
12
|
-
from mapchete_eo.archives.base import Archive
|
|
13
|
-
from mapchete_eo.io.items import item_fix_footprint
|
|
14
|
-
from mapchete_eo.known_catalogs import (
|
|
15
|
-
AWSSearchCatalogS2L2A,
|
|
16
|
-
CDSESearch,
|
|
17
|
-
EarthSearchV1S2L2A,
|
|
18
|
-
)
|
|
19
|
-
from mapchete_eo.platforms.sentinel2.types import ProcessingLevel
|
|
20
|
-
from mapchete_eo.search.s2_mgrs import S2Tile
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
def known_archive(v: Any, **args) -> Type[Archive]:
|
|
24
|
-
if isinstance(v, str):
|
|
25
|
-
return KnownArchives[v].value
|
|
26
|
-
elif isinstance(v, type(Archive)):
|
|
27
|
-
return v
|
|
28
|
-
else:
|
|
29
|
-
raise ValidationError(f"cannot validate {v} to archive")
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
ArchiveClsFromString = Annotated[Type[Archive], BeforeValidator(known_archive)]
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
def add_datastrip_id(item: Item) -> Item:
|
|
36
|
-
"""Make sure item metadata is following the standard."""
|
|
37
|
-
# change 'sentinel2' prefix to 's2'
|
|
38
|
-
properties = {k.replace("sentinel2:", "s2:"): v for k, v in item.properties.items()}
|
|
39
|
-
|
|
40
|
-
# add datastrip id as 's2:datastrip_id'
|
|
41
|
-
if not properties.get("s2:datastrip_id"):
|
|
42
|
-
from mapchete_eo.platforms.sentinel2 import S2Metadata
|
|
43
|
-
|
|
44
|
-
s2_metadata = S2Metadata.from_stac_item(item)
|
|
45
|
-
properties["s2:datastrip_id"] = s2_metadata.datastrip_id
|
|
46
|
-
|
|
47
|
-
item.properties = properties
|
|
48
|
-
return item
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
def map_cdse_paths_to_jp2_archive(item: Item) -> Item:
|
|
52
|
-
"""
|
|
53
|
-
CSDE has the following assets:
|
|
54
|
-
AOT_10m, AOT_20m, AOT_60m, B01_20m, B01_60m, B02_10m, B02_20m, B02_60m, B03_10m, B03_20m,
|
|
55
|
-
B03_60m, B04_10m, B04_20m, B04_60m, B05_20m, B05_60m, B06_20m, B06_60m, B07_20m, B07_60m,
|
|
56
|
-
B08_10m, B09_60m, B11_20m, B11_60m, B12_20m, B12_60m, B8A_20m, B8A_60m, Product, SCL_20m,
|
|
57
|
-
SCL_60m, TCI_10m, TCI_20m, TCI_60m, WVP_10m, WVP_20m, WVP_60m, thumbnail, safe_manifest,
|
|
58
|
-
granule_metadata, inspire_metadata, product_metadata, datastrip_metadata
|
|
59
|
-
|
|
60
|
-
sample path for AWS JP2:
|
|
61
|
-
s3://sentinel-s2-l2a/tiles/51/K/XR/2020/7/31/0/R10m/
|
|
62
|
-
"""
|
|
63
|
-
band_name_mapping = {
|
|
64
|
-
"AOT_10m": "aot",
|
|
65
|
-
"B01_20m": "coastal",
|
|
66
|
-
"B02_10m": "blue",
|
|
67
|
-
"B03_10m": "green",
|
|
68
|
-
"B04_10m": "red",
|
|
69
|
-
"B05_20m": "rededge1",
|
|
70
|
-
"B06_20m": "rededge2",
|
|
71
|
-
"B07_20m": "rededge3",
|
|
72
|
-
"B08_10m": "nir",
|
|
73
|
-
"B09_60m": "nir09",
|
|
74
|
-
"B11_20m": "swir16",
|
|
75
|
-
"B12_20m": "swir22",
|
|
76
|
-
"B8A_20m": "nir08",
|
|
77
|
-
"SCL_20m": "scl",
|
|
78
|
-
"TCI_10m": "visual",
|
|
79
|
-
"WVP_10m": "wvp",
|
|
80
|
-
}
|
|
81
|
-
path_base_scheme = "s3://sentinel-s2-l2a/tiles/{utm_zone}/{latitude_band}/{grid_square}/{year}/{month}/{day}/{count}"
|
|
82
|
-
s2tile = S2Tile.from_grid_code(item.properties["grid:code"])
|
|
83
|
-
if item.datetime is None:
|
|
84
|
-
raise ValueError(f"product {item.get_self_href()} does not have a timestamp")
|
|
85
|
-
product_basepath = MPath(
|
|
86
|
-
path_base_scheme.format(
|
|
87
|
-
utm_zone=s2tile.utm_zone,
|
|
88
|
-
latitude_band=s2tile.latitude_band,
|
|
89
|
-
grid_square=s2tile.grid_square,
|
|
90
|
-
year=item.datetime.year,
|
|
91
|
-
month=item.datetime.month,
|
|
92
|
-
day=item.datetime.day,
|
|
93
|
-
count=0, # TODO: get count dynamically from metadata
|
|
94
|
-
)
|
|
95
|
-
)
|
|
96
|
-
new_assets = {}
|
|
97
|
-
for asset_name, asset in item.assets.items():
|
|
98
|
-
# ignore these assets
|
|
99
|
-
if asset_name in [
|
|
100
|
-
"Product",
|
|
101
|
-
"safe_manifest",
|
|
102
|
-
"product_metadata",
|
|
103
|
-
"inspire_metadata",
|
|
104
|
-
"datastrip_metadata",
|
|
105
|
-
]:
|
|
106
|
-
continue
|
|
107
|
-
# set thumbnnail
|
|
108
|
-
elif asset_name == "thumbnail":
|
|
109
|
-
asset.href = str(product_basepath / "R60m" / "TCI.jp2")
|
|
110
|
-
# point to proper metadata
|
|
111
|
-
elif asset_name == "granule_metadata":
|
|
112
|
-
asset.href = str(product_basepath / "metadata.xml")
|
|
113
|
-
# change band asset names and point to their new locations
|
|
114
|
-
elif asset_name in band_name_mapping:
|
|
115
|
-
name, resolution = asset_name.split("_")
|
|
116
|
-
asset.href = product_basepath / f"R{resolution}" / f"{name}.jp2"
|
|
117
|
-
asset_name = band_name_mapping[asset_name]
|
|
118
|
-
else:
|
|
119
|
-
continue
|
|
120
|
-
new_assets[asset_name] = asset
|
|
121
|
-
|
|
122
|
-
item.assets = new_assets
|
|
123
|
-
|
|
124
|
-
item.properties["s2:datastrip_id"] = item.properties.get("eopf:datastrip_id")
|
|
125
|
-
return item
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
class AWSL2ACOGv1(Archive):
|
|
129
|
-
"""COG archive on AWS using E84 STAC search endpoint."""
|
|
130
|
-
|
|
131
|
-
catalog = EarthSearchV1S2L2A(
|
|
132
|
-
collections=["sentinel-2-l2a"],
|
|
133
|
-
)
|
|
134
|
-
item_modifier_funcs = [
|
|
135
|
-
item_fix_footprint,
|
|
136
|
-
]
|
|
137
|
-
processing_level = ProcessingLevel.level2a
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
class AWSL2AJP2(Archive):
|
|
141
|
-
"""
|
|
142
|
-
JP2000 archive on AWS using dumb S3 path guesser.
|
|
143
|
-
"""
|
|
144
|
-
|
|
145
|
-
catalog = AWSSearchCatalogS2L2A(
|
|
146
|
-
collections=["sentinel-s2-l2a"],
|
|
147
|
-
)
|
|
148
|
-
item_modifier_funcs = [
|
|
149
|
-
item_fix_footprint,
|
|
150
|
-
add_datastrip_id,
|
|
151
|
-
]
|
|
152
|
-
processing_level = ProcessingLevel.level2a
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
class AWSL2AJP2CSDE(Archive):
|
|
156
|
-
"""
|
|
157
|
-
JP2000 archive on AWS using CDSE STAC search endpoint.
|
|
158
|
-
"""
|
|
159
|
-
|
|
160
|
-
catalog = CDSESearch(
|
|
161
|
-
collections=["sentinel-2-l2a"],
|
|
162
|
-
)
|
|
163
|
-
item_modifier_funcs = [
|
|
164
|
-
item_fix_footprint,
|
|
165
|
-
map_cdse_paths_to_jp2_archive,
|
|
166
|
-
add_datastrip_id,
|
|
167
|
-
]
|
|
168
|
-
processing_level = ProcessingLevel.level2a
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
class CDSEL2AJP2CSDE(Archive):
|
|
172
|
-
"""
|
|
173
|
-
JP2000 archive on CDSE (EODATA s3) using CDSE STAC search endpoint.
|
|
174
|
-
"""
|
|
175
|
-
|
|
176
|
-
catalog = CDSESearch(
|
|
177
|
-
collections=["sentinel-2-l2a"],
|
|
178
|
-
)
|
|
179
|
-
item_modifier_funcs = [
|
|
180
|
-
item_fix_footprint,
|
|
181
|
-
add_datastrip_id,
|
|
182
|
-
]
|
|
183
|
-
processing_level = ProcessingLevel.level2a
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
class KnownArchives(Enum):
|
|
187
|
-
S2AWS_COG = AWSL2ACOGv1
|
|
188
|
-
S2AWS_JP2 = AWSL2AJP2
|
|
189
|
-
S2CDSE_AWSJP2 = AWSL2AJP2CSDE
|
|
190
|
-
S2CDSE_JP2 = CDSEL2AJP2CSDE
|
|
@@ -1,29 +0,0 @@
|
|
|
1
|
-
from mapchete_eo.platforms.sentinel2.path_mappers.base import S2PathMapper
|
|
2
|
-
from mapchete_eo.platforms.sentinel2.path_mappers.earthsearch import (
|
|
3
|
-
EarthSearchPathMapper,
|
|
4
|
-
)
|
|
5
|
-
from mapchete_eo.platforms.sentinel2.path_mappers.metadata_xml import XMLMapper
|
|
6
|
-
from mapchete_eo.platforms.sentinel2.path_mappers.sinergise import SinergisePathMapper
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
def default_path_mapper_guesser(
|
|
10
|
-
url: str,
|
|
11
|
-
**kwargs,
|
|
12
|
-
) -> S2PathMapper:
|
|
13
|
-
"""Guess S2PathMapper based on URL.
|
|
14
|
-
|
|
15
|
-
If a new path mapper is added in this module, it should also be added to this function
|
|
16
|
-
in order to be detected.
|
|
17
|
-
"""
|
|
18
|
-
if url.startswith(
|
|
19
|
-
("https://roda.sentinel-hub.com/sentinel-s2-l2a/", "s3://sentinel-s2-l2a/")
|
|
20
|
-
) or url.startswith(
|
|
21
|
-
("https://roda.sentinel-hub.com/sentinel-s2-l1c/", "s3://sentinel-s2-l1c/")
|
|
22
|
-
):
|
|
23
|
-
return SinergisePathMapper(url, **kwargs)
|
|
24
|
-
elif url.startswith(
|
|
25
|
-
"https://sentinel-cogs.s3.us-west-2.amazonaws.com/sentinel-s2-l2a-cogs/"
|
|
26
|
-
):
|
|
27
|
-
return EarthSearchPathMapper(url, **kwargs)
|
|
28
|
-
else:
|
|
29
|
-
return XMLMapper(url, **kwargs)
|
|
@@ -1,34 +0,0 @@
|
|
|
1
|
-
from mapchete.path import MPath
|
|
2
|
-
|
|
3
|
-
from mapchete_eo.platforms.sentinel2.path_mappers.sinergise import SinergisePathMapper
|
|
4
|
-
from mapchete_eo.platforms.sentinel2.processing_baseline import ProcessingBaseline
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
class EarthSearchPathMapper(SinergisePathMapper):
|
|
8
|
-
"""
|
|
9
|
-
The COG archive maintained by E84 and covered by EarthSearch does not hold additional data
|
|
10
|
-
such as the GML files. This class maps the metadata masks to the current EarthSearch product.
|
|
11
|
-
|
|
12
|
-
e.g.:
|
|
13
|
-
B01 detector footprints: s3://sentinel-s2-l2a/tiles/51/K/XR/2020/7/31/0/qi/MSK_DETFOO_B01.gml
|
|
14
|
-
Cloud masks: s3://sentinel-s2-l2a/tiles/51/K/XR/2020/7/31/0/qi/MSK_CLOUDS_B00.gml
|
|
15
|
-
|
|
16
|
-
newer products however:
|
|
17
|
-
B01 detector footprints: s3://sentinel-s2-l2a/tiles/51/K/XR/2022/6/6/0/qi/DETFOO_B01.jp2
|
|
18
|
-
no vector cloudmasks available anymore
|
|
19
|
-
"""
|
|
20
|
-
|
|
21
|
-
def __init__(
|
|
22
|
-
self,
|
|
23
|
-
metadata_xml: MPath,
|
|
24
|
-
alternative_metadata_baseurl: str = "sentinel-s2-l2a",
|
|
25
|
-
protocol: str = "s3",
|
|
26
|
-
baseline_version: str = "04.00",
|
|
27
|
-
**kwargs,
|
|
28
|
-
):
|
|
29
|
-
basedir = metadata_xml.parent
|
|
30
|
-
self._path = (basedir / "tileinfo_metadata.json").read_json()["path"]
|
|
31
|
-
self._utm_zone, self._latitude_band, self._grid_square = basedir.elements[-6:-3]
|
|
32
|
-
self._baseurl = alternative_metadata_baseurl
|
|
33
|
-
self._protocol = protocol
|
|
34
|
-
self.processing_baseline = ProcessingBaseline.from_version(baseline_version)
|
|
@@ -1,105 +0,0 @@
|
|
|
1
|
-
from mapchete.path import MPath, MPathLike
|
|
2
|
-
|
|
3
|
-
from mapchete_eo.platforms.sentinel2.path_mappers.base import S2PathMapper
|
|
4
|
-
from mapchete_eo.platforms.sentinel2.processing_baseline import ProcessingBaseline
|
|
5
|
-
from mapchete_eo.platforms.sentinel2.types import (
|
|
6
|
-
BandQI,
|
|
7
|
-
L2ABand,
|
|
8
|
-
ProductQI,
|
|
9
|
-
ProductQIMaskResolution,
|
|
10
|
-
)
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
class SinergisePathMapper(S2PathMapper):
|
|
14
|
-
"""
|
|
15
|
-
Return true paths of product quality assets from the Sinergise S2 bucket.
|
|
16
|
-
|
|
17
|
-
e.g.:
|
|
18
|
-
B01 detector footprints: s3://sentinel-s2-l2a/tiles/51/K/XR/2020/7/31/0/qi/MSK_DETFOO_B01.gml
|
|
19
|
-
Cloud masks: s3://sentinel-s2-l2a/tiles/51/K/XR/2020/7/31/0/qi/MSK_CLOUDS_B00.gml
|
|
20
|
-
|
|
21
|
-
newer products however:
|
|
22
|
-
B01 detector footprints: s3://sentinel-s2-l2a/tiles/51/K/XR/2022/6/6/0/qi/DETFOO_B01.jp2
|
|
23
|
-
no vector cloudmasks available anymore
|
|
24
|
-
"""
|
|
25
|
-
|
|
26
|
-
_PRE_0400_MASK_PATHS = {
|
|
27
|
-
ProductQI.classification: "MSK_CLOUDS_B00.gml",
|
|
28
|
-
ProductQI.cloud_probability: "CLD_{resolution}.jp2", # are they really there?
|
|
29
|
-
ProductQI.snow_probability: "SNW_{resolution}.jp2", # are they really there?
|
|
30
|
-
BandQI.detector_footprints: "MSK_DETFOO_{band_identifier}.gml",
|
|
31
|
-
BandQI.technical_quality: "MSK_TECQUA_{band_identifier}.gml",
|
|
32
|
-
}
|
|
33
|
-
_POST_0400_MASK_PATHS = {
|
|
34
|
-
ProductQI.classification: "CLASSI_B00.jp2",
|
|
35
|
-
ProductQI.cloud_probability: "CLD_{resolution}.jp2",
|
|
36
|
-
ProductQI.snow_probability: "SNW_{resolution}.jp2",
|
|
37
|
-
BandQI.detector_footprints: "DETFOO_{band_identifier}.jp2",
|
|
38
|
-
BandQI.technical_quality: "QUALIT_{band_identifier}.jp2",
|
|
39
|
-
}
|
|
40
|
-
|
|
41
|
-
def __init__(
|
|
42
|
-
self,
|
|
43
|
-
url: MPathLike,
|
|
44
|
-
bucket: str = "sentinel-s2-l2a",
|
|
45
|
-
protocol: str = "s3",
|
|
46
|
-
baseline_version: str = "04.00",
|
|
47
|
-
**kwargs,
|
|
48
|
-
):
|
|
49
|
-
url = MPath.from_inp(url)
|
|
50
|
-
tileinfo_path = url.parent / "tileInfo.json"
|
|
51
|
-
self._path = MPath(
|
|
52
|
-
"/".join(tileinfo_path.elements[-9:-1]), **tileinfo_path._kwargs
|
|
53
|
-
)
|
|
54
|
-
self._utm_zone, self._latitude_band, self._grid_square = self._path.split("/")[
|
|
55
|
-
1:-4
|
|
56
|
-
]
|
|
57
|
-
self._baseurl = bucket
|
|
58
|
-
self._protocol = protocol
|
|
59
|
-
self.processing_baseline = ProcessingBaseline.from_version(baseline_version)
|
|
60
|
-
|
|
61
|
-
def product_qi_mask(
|
|
62
|
-
self,
|
|
63
|
-
qi_mask: ProductQI,
|
|
64
|
-
resolution: ProductQIMaskResolution = ProductQIMaskResolution["60m"],
|
|
65
|
-
) -> MPath:
|
|
66
|
-
"""Determine product QI mask according to Sinergise bucket schema."""
|
|
67
|
-
if self.processing_baseline.version < "04.00":
|
|
68
|
-
mask_path = self._PRE_0400_MASK_PATHS[qi_mask]
|
|
69
|
-
else:
|
|
70
|
-
mask_path = self._POST_0400_MASK_PATHS[qi_mask]
|
|
71
|
-
key = f"{self._path}/qi/{mask_path.format(resolution=resolution.name)}"
|
|
72
|
-
return MPath.from_inp(f"{self._protocol}://{self._baseurl}/{key}")
|
|
73
|
-
|
|
74
|
-
def classification_mask(self) -> MPath:
|
|
75
|
-
return self.product_qi_mask(ProductQI.classification)
|
|
76
|
-
|
|
77
|
-
def cloud_probability_mask(
|
|
78
|
-
self, resolution: ProductQIMaskResolution = ProductQIMaskResolution["60m"]
|
|
79
|
-
) -> MPath:
|
|
80
|
-
return self.product_qi_mask(ProductQI.cloud_probability, resolution=resolution)
|
|
81
|
-
|
|
82
|
-
def snow_probability_mask(
|
|
83
|
-
self, resolution: ProductQIMaskResolution = ProductQIMaskResolution["60m"]
|
|
84
|
-
) -> MPath:
|
|
85
|
-
return self.product_qi_mask(ProductQI.snow_probability, resolution=resolution)
|
|
86
|
-
|
|
87
|
-
def band_qi_mask(self, qi_mask: BandQI, band: L2ABand) -> MPath:
|
|
88
|
-
"""Determine product QI mask according to Sinergise bucket schema."""
|
|
89
|
-
try:
|
|
90
|
-
if self.processing_baseline.version < "04.00":
|
|
91
|
-
mask_path = self._PRE_0400_MASK_PATHS[qi_mask]
|
|
92
|
-
else:
|
|
93
|
-
mask_path = self._POST_0400_MASK_PATHS[qi_mask]
|
|
94
|
-
except KeyError:
|
|
95
|
-
raise DeprecationWarning(
|
|
96
|
-
f"'{qi_mask.name}' quality mask not found in this product"
|
|
97
|
-
)
|
|
98
|
-
key = f"{self._path}/qi/{mask_path.format(band_identifier=band.name)}"
|
|
99
|
-
return MPath.from_inp(f"{self._protocol}://{self._baseurl}/{key}")
|
|
100
|
-
|
|
101
|
-
def technical_quality_mask(self, band: L2ABand) -> MPath:
|
|
102
|
-
return self.band_qi_mask(BandQI.technical_quality, band)
|
|
103
|
-
|
|
104
|
-
def detector_footprints(self, band: L2ABand) -> MPath:
|
|
105
|
-
return self.band_qi_mask(BandQI.detector_footprints, band)
|
|
@@ -1,88 +0,0 @@
|
|
|
1
|
-
mapchete_eo/__init__.py,sha256=r2vzraIeM6daquybaheJf__iYb9hpxuEfM5uy2Ygulg,26
|
|
2
|
-
mapchete_eo/base.py,sha256=G4DFwU9AjzWLfF_8hWPKmjsBhpwtJxQ_Z31-uZjAeFc,20294
|
|
3
|
-
mapchete_eo/blacklist.txt,sha256=6KhBY0jNjXgRpKRvKJoOTswvNUoP56IrIcNeCYnd2qo,17471
|
|
4
|
-
mapchete_eo/eostac.py,sha256=5K08Mr4wm-VOXTEvTB6DQHX7rbFLYw8mjW1wlpPltC0,574
|
|
5
|
-
mapchete_eo/exceptions.py,sha256=ul7_9o6_SfJXQPsDOQqRBhh09xv2t4AwHl6YJ7yWN5s,2150
|
|
6
|
-
mapchete_eo/geometry.py,sha256=NiLeXSnp2c_AsBin8XUFzlr_ndqHbKos-dHQSDApIro,9420
|
|
7
|
-
mapchete_eo/known_catalogs.py,sha256=dlxImeNwaUVuss-sGddixTcxjcrznyR-XWKfkX9S5PA,1274
|
|
8
|
-
mapchete_eo/product.py,sha256=_KULHdTWbUw0TkRfpm8xvD2qukhuMmm9ov7cJz9aY18,9523
|
|
9
|
-
mapchete_eo/protocols.py,sha256=_WxiHPgErDjiJ0dzWJiWjHm0ZgoDlG16oEw1X1fzUXc,1512
|
|
10
|
-
mapchete_eo/settings.py,sha256=-i4UPX0KJ7NWGpGzOUkhzCABOMz2xc-q3sVLBFT4JAM,696
|
|
11
|
-
mapchete_eo/sort.py,sha256=puj3YBTL-AikC--CZwvfYCKVQWy7URMUzobf2rm9FGU,1817
|
|
12
|
-
mapchete_eo/time.py,sha256=mCIrn6C-B7CDoFIIM4u8pG15nVV8KWQixF2fuhdDTdE,1799
|
|
13
|
-
mapchete_eo/types.py,sha256=yIHKZHlGCSerJzDBS2AH7yYLun4rY3rZZ73SCKiN26U,1814
|
|
14
|
-
mapchete_eo/archives/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
15
|
-
mapchete_eo/archives/base.py,sha256=32NCFg46p95Uv3rO-M0Y-W6iCH4BzLtfUHpHfyzzrC4,2157
|
|
16
|
-
mapchete_eo/array/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
17
|
-
mapchete_eo/array/buffer.py,sha256=GeeM7RVQ-Z_SKlkaeztWUrxEsa_yck-nXwXRIM3w0_I,483
|
|
18
|
-
mapchete_eo/array/color.py,sha256=ArJ3-0qjJJGAlRQodLios6JwD0uHLSRRb9BwfB31v-U,810
|
|
19
|
-
mapchete_eo/array/convert.py,sha256=oimklMfyS2XxQLd73zQ2cr9aE-39z1UIt6ry_2ZQI10,5390
|
|
20
|
-
mapchete_eo/cli/__init__.py,sha256=SRRilPKUtwsUCi1GdMNPxjIrCM-XyYM2hK1T9vvKUI8,946
|
|
21
|
-
mapchete_eo/cli/bounds.py,sha256=QcOXOXMcnd8ecwiCFVWukTLUFIkpj9SbB3ot-GA4heA,551
|
|
22
|
-
mapchete_eo/cli/options_arguments.py,sha256=6rnnABT8WU6DF6vvy7lGDj5-OpMMo1Vb36fL1oan56c,7344
|
|
23
|
-
mapchete_eo/cli/s2_brdf.py,sha256=BCBGyK3C3kEMkJinphp_mFqtbaF4hm8xGIWNyNK785Y,2718
|
|
24
|
-
mapchete_eo/cli/s2_cat_results.py,sha256=e7esJenjDil_VqNKcgTvNb6pAYXfWiR0OgGWxmOx0SY,5220
|
|
25
|
-
mapchete_eo/cli/s2_find_broken_products.py,sha256=dAwjLs3yfUJ7sn5BoauZBrJ3P3jKK1iofWxSDTAkXl4,3498
|
|
26
|
-
mapchete_eo/cli/s2_jp2_static_catalog.py,sha256=-gSHjORaIizQ7qmgrvBgpm1FrV5BL1_uleEQPmAAab0,5925
|
|
27
|
-
mapchete_eo/cli/s2_mask.py,sha256=1K5BiyTKyClGBdh6-Vh_ORTcgJOr6R5JfXtpEpDEQvk,2243
|
|
28
|
-
mapchete_eo/cli/s2_mgrs.py,sha256=EJxbrg4I8IttWIcLUEmmqkjsTUbVLufgrkDVrRbbkYE,1276
|
|
29
|
-
mapchete_eo/cli/s2_rgb.py,sha256=nzK5m4s0m2VOXgtit0uUOOhNJ14wquikWmbEQON5WJw,3747
|
|
30
|
-
mapchete_eo/cli/s2_verify.py,sha256=atfJA5luHZjDSqiM2udaufmnQ2B4uW2Tur_OgtYLa2g,4080
|
|
31
|
-
mapchete_eo/cli/static_catalog.py,sha256=zq20fc0phjfjWMjSao-L6VVI-o2DPrMapvDmy6i30YQ,4291
|
|
32
|
-
mapchete_eo/image_operations/__init__.py,sha256=c36Vs53mT5UQR9Iwd2Ln_vnT4K_Ni8g-K7J9Fl6UsJo,432
|
|
33
|
-
mapchete_eo/image_operations/blend_functions.py,sha256=YaKLOEapMbsUR-_mkBatXwPcmim8GKpIAVua_GOdaHs,24131
|
|
34
|
-
mapchete_eo/image_operations/color_correction.py,sha256=vMXxcdyH3qOJDSKcXGU3FgXWIcgQxMy-QVe2fGQTbdk,4447
|
|
35
|
-
mapchete_eo/image_operations/compositing.py,sha256=K0bGCZqJuS39IBsjrRiJz5zowItI6RsiA-EBUVlbboo,8449
|
|
36
|
-
mapchete_eo/image_operations/dtype_scale.py,sha256=_CCdTBkMLDkZdjV_PsVEkqLWT6jWuTJPeMzCcRwBOns,1243
|
|
37
|
-
mapchete_eo/image_operations/fillnodata.py,sha256=Xdd-kacfo7VKqX7HRP0hqnnvV5OwNqnHLRTW64QhG24,4856
|
|
38
|
-
mapchete_eo/image_operations/filters.py,sha256=sa_Igv0zMIANHLEALVi8mxohZMoSrdQc6XVjXDYwzy8,7201
|
|
39
|
-
mapchete_eo/image_operations/linear_normalization.py,sha256=-eQX3WLCUYWUv-um3s1u33rgjAwCz84Ht8gcPsMWtJE,2468
|
|
40
|
-
mapchete_eo/image_operations/sigmoidal.py,sha256=IKU8F89HhQJWGUVmIrnkuhqzn_ztlGrTf8xXZaVQWzU,3575
|
|
41
|
-
mapchete_eo/io/__init__.py,sha256=1-1g4cESZZREvyumEUABZhDwgVuSxtxdqbNlLuVKlow,950
|
|
42
|
-
mapchete_eo/io/assets.py,sha256=8OrqvrCzJOY0pExh_vKRL7Bz_RGk6M_LfayQqxHo8ag,17014
|
|
43
|
-
mapchete_eo/io/items.py,sha256=7l6A5E6fDNOAx7cjvu3VDP1WlD-ufEUBzt1uBBRD80Q,5750
|
|
44
|
-
mapchete_eo/io/levelled_cubes.py,sha256=ZF7BLn9MHnJCCDjAoR9D7MNbHdusjJ9EACdM7rKNlyM,9018
|
|
45
|
-
mapchete_eo/io/path.py,sha256=y5aYr-dE-0BafgF1_RCSXCvbF3taCI-EOz0R58rNxO8,4413
|
|
46
|
-
mapchete_eo/io/products.py,sha256=2IdReyvVNY06BHUgdb7EwePqrUL0bL070c6Dnv6RhB0,14627
|
|
47
|
-
mapchete_eo/io/profiles.py,sha256=l9YiXbKYs674xz6NLy5EAq3fBEvHTVSf_gopXD-CuSY,935
|
|
48
|
-
mapchete_eo/platforms/sentinel2/__init__.py,sha256=zAyBzOhwKSIyNJyfEpyY6G-PxPDhLvOCky8aA2PsW_k,390
|
|
49
|
-
mapchete_eo/platforms/sentinel2/archives.py,sha256=uhIY0EUta45Ka94ky35NZ33Hxi0qPA2yIu21ad1z6CQ,5830
|
|
50
|
-
mapchete_eo/platforms/sentinel2/bandpass_adjustment.py,sha256=DA0cQtjr8UH7r_kizAD-EmBsZvEtVVThf0hD0SCY7b4,3202
|
|
51
|
-
mapchete_eo/platforms/sentinel2/config.py,sha256=Mn_uw2bdR6gcIWPS_istY6E5HaN6JLuxQO05HtEovNU,5974
|
|
52
|
-
mapchete_eo/platforms/sentinel2/driver.py,sha256=ny9Rfnvi07NeB29RwimqBIF7BbCxPPRfZO_rfDJyWzI,2776
|
|
53
|
-
mapchete_eo/platforms/sentinel2/masks.py,sha256=6ig8sQhXkm1u6Bwbe7n8ewW8gTdbVJp-iaDCk780Qxg,11220
|
|
54
|
-
mapchete_eo/platforms/sentinel2/metadata_parser.py,sha256=czh-2M_r79sWFbZETk_-0eOyvonbhaY7Hkb3tRTeF5A,26723
|
|
55
|
-
mapchete_eo/platforms/sentinel2/preprocessing_tasks.py,sha256=eJh1wSDsQkEKtQ6G6vmVkFBoBl5nZUV5vNHQM4RifQg,772
|
|
56
|
-
mapchete_eo/platforms/sentinel2/processing_baseline.py,sha256=B2-t5H7xC54g2aIvcdBSRQPHygfqccbKEhXSgClAADY,5085
|
|
57
|
-
mapchete_eo/platforms/sentinel2/product.py,sha256=9grX6TGCryVxS8TH6Lzc-yca-8zKzCx_WD1r3_bPK9E,25376
|
|
58
|
-
mapchete_eo/platforms/sentinel2/types.py,sha256=Cd0bmDT1mLETuSJYEAoF8Kl4-QOPv2fFrwgR8xHTka0,2009
|
|
59
|
-
mapchete_eo/platforms/sentinel2/brdf/__init__.py,sha256=W7zAJZ5F5Xla7j4ua2opRANUbcD3jZbhTwhW5_cpOUI,242
|
|
60
|
-
mapchete_eo/platforms/sentinel2/brdf/config.py,sha256=v3WCEu4r-tEPQgWBEkYNAPLgCQobvYtQ2YiDeAdImMk,1133
|
|
61
|
-
mapchete_eo/platforms/sentinel2/brdf/correction.py,sha256=g7gS0gMD1lCHjmm62IF9c297MqsBJ1xSRm2F8t_Xd5w,8640
|
|
62
|
-
mapchete_eo/platforms/sentinel2/brdf/hls.py,sha256=Z1jqiJzarss2knaH0TQQNMrWCDZA5ZE_TpnjHNPLkYQ,8807
|
|
63
|
-
mapchete_eo/platforms/sentinel2/brdf/models.py,sha256=mtuKteEEy8EXOp1hiFRfE5zk1YK4dsXT6GoEediqa_o,1435
|
|
64
|
-
mapchete_eo/platforms/sentinel2/brdf/protocols.py,sha256=Iqq_VKcRSyGtNuEtuoWGxijVnwPT_8ed8n1yRU1EwmE,741
|
|
65
|
-
mapchete_eo/platforms/sentinel2/brdf/ross_thick.py,sha256=sjthta25e0cOGL-O5yxydFjavRN5FiGCeON1UKhhQ00,4674
|
|
66
|
-
mapchete_eo/platforms/sentinel2/brdf/sun_angle_arrays.py,sha256=zzHLjzxzinVtqzNIY3wt-j5E7QJF4GE-Wf3_HriPgIw,2137
|
|
67
|
-
mapchete_eo/platforms/sentinel2/path_mappers/__init__.py,sha256=vX3tu610BQ7pgG9Ooltoi-Upoja1Y_l5tvgZYIcFT6g,1081
|
|
68
|
-
mapchete_eo/platforms/sentinel2/path_mappers/base.py,sha256=xuri2IG5infKFtw05oQHTJiM2ZnP3Hj2HYfHr9gMltM,1512
|
|
69
|
-
mapchete_eo/platforms/sentinel2/path_mappers/earthsearch.py,sha256=O1H18z258I_Vo7wVNlVf9gw4dAfH10V5x4q_PJwTJVg,1422
|
|
70
|
-
mapchete_eo/platforms/sentinel2/path_mappers/metadata_xml.py,sha256=lwxnFQ2ejxvMUNNe2d7RYYodz-ydtubkhOihQaosx4Y,5325
|
|
71
|
-
mapchete_eo/platforms/sentinel2/path_mappers/sinergise.py,sha256=qHp4yOK_po6IvGt50QmTmB09s9AkQiYq8W0fqHSUgt0,4287
|
|
72
|
-
mapchete_eo/processes/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
73
|
-
mapchete_eo/processes/config.py,sha256=WorMzHJzJaZPh-aEyEEwcXN08ALxn6zAhVMrjkDUWDU,1745
|
|
74
|
-
mapchete_eo/processes/dtype_scale.py,sha256=7hJlIe2DsE6Kmk1c3PLwLr8rnn_4_9S6Cz7bmRuzP9M,4176
|
|
75
|
-
mapchete_eo/processes/eo_to_xarray.py,sha256=Gcp4qju2C9S8KeUnVY5f3nAsrdckPhGRguzsgRtWBFs,514
|
|
76
|
-
mapchete_eo/processes/merge_rasters.py,sha256=jSXUI8pEWXbQWrM9iMtrH4ACH2VkCaBUH9CQg4z6zLA,8486
|
|
77
|
-
mapchete_eo/search/__init__.py,sha256=71VuR1BFFbFiV9rae5qXt0RLtwWk1DP_CYbZflMZDWA,516
|
|
78
|
-
mapchete_eo/search/base.py,sha256=LQfCwsZW5YFZx5pvyNSpfDbcObB-UGypjfrvL-3VUZE,8883
|
|
79
|
-
mapchete_eo/search/config.py,sha256=0idsjXt2T8scerlw-PzNVc0u8JxpOxHgrEO2asSRtNE,1122
|
|
80
|
-
mapchete_eo/search/s2_mgrs.py,sha256=5LWl9c7WzFvXODr9f8m37cv-8yyf-LvnN0-TSSPcXKM,10868
|
|
81
|
-
mapchete_eo/search/stac_search.py,sha256=TXsCSMi3PBst80_vexXv0pvY5DNcD8sgtsw3zOQtoRA,9844
|
|
82
|
-
mapchete_eo/search/stac_static.py,sha256=3PA1uUIQy0bHywFA3_hmyn65pjlWEqeCW4Gx2DdZMZI,8839
|
|
83
|
-
mapchete_eo/search/utm_search.py,sha256=__HZCw5no9_8Rb6kO1pCfCEUS_ZwmgrVwlcyE78SY6k,9754
|
|
84
|
-
mapchete_eo-2025.10.1.dist-info/METADATA,sha256=edkh71VZo0bygu4yQ44RIeR9CnshfudaH-HOx76lg7w,3237
|
|
85
|
-
mapchete_eo-2025.10.1.dist-info/WHEEL,sha256=tkmg4JIqwd9H8mL30xA7crRmoStyCtGp0VWshokd1Jc,105
|
|
86
|
-
mapchete_eo-2025.10.1.dist-info/entry_points.txt,sha256=ewk6R4FGdAclOnUpikhlPZGWI40MWeksVIIwu4jVebk,324
|
|
87
|
-
mapchete_eo-2025.10.1.dist-info/licenses/LICENSE,sha256=TC5JwvBnFrUgsSQSCDFPc3cqlbth2N0q8MWrhY1EVd0,1089
|
|
88
|
-
mapchete_eo-2025.10.1.dist-info/RECORD,,
|