diff --git a/src/eodm/extract.py b/src/eodm/extract.py index 0991c7d..29e9c31 100644 --- a/src/eodm/extract.py +++ b/src/eodm/extract.py @@ -1,9 +1,12 @@ +from datetime import datetime from typing import Iterator, Optional import pystac_client +from geojson_pydantic.geometries import Geometry from owslib.ogcapi.records import Records from pystac import Collection, Item +from .odata import ODataClient, ODataCollection, ODataProduct, ODataQuery from .opensearch import OpenSearchClient, OpenSearchFeature @@ -66,7 +69,7 @@ def extract_opensearch_features( Args: url (str): Link to OpenSearch API endpoint - productTypes (list[str]): List of productTypes to search for + product_types (list[str]): List of productTypes to search for Yields: Iterator[OpenSearchFeature]: OpenSearch Features @@ -84,6 +87,42 @@ def extract_opensearch_features( yield feature +def extract_odata_products( + url: str, + collections: list[ODataCollection], + datetime: tuple[datetime, datetime] | None = None, + intersect_geometry: Geometry | None = None, + online: bool = True, + cloud_cover_less_than: int | None = None, + name_contains: Optional[str] = None, + name_not_contains: Optional[str] = None, + top: int = 20, +) -> Iterator[ODataProduct]: + """Extracts OData Products from an OData API + + Args: + url (str): Link to OData API endpoint + collections (list[ODataCollection]): List of collections to search for + datetime (tuple[datetime, datetime], optional): Datetime interval to search. Defaults to None. + intersect_geometry (Geometry, optional): Geometry to intersect. Defaults to None. + online (bool, optional): Filter for online products. Defaults to True. + """ + client = ODataClient(url) + for collection in collections: + query = ODataQuery( + collection=collection.value, + top=top, + sensing_date=datetime, + cloud_cover_less_than=cloud_cover_less_than, + intersect_geometry=intersect_geometry, + online=online, + name_contains=name_contains, + name_not_contains=name_not_contains, + ) + for product in client.search(query): + yield product + + def extract_ogcapi_records_catalogs(url: str) -> Iterator[dict]: """Extracts OGC API Records from an OGC API Records endpoint diff --git a/src/eodm/odata.py b/src/eodm/odata.py new file mode 100644 index 0000000..793890a --- /dev/null +++ b/src/eodm/odata.py @@ -0,0 +1,131 @@ +from datetime import datetime +from enum import Enum +from typing import Annotated, Iterator + +import httpx +from geojson_pydantic.geometries import Geometry +from pydantic import BaseModel, Field + + +class ODataCollection(Enum): + SENTINEL_1 = "SENTINEL-1" + SENTINEL_2 = "SENTINEL-2" + SENTINEL_3 = "SENTINEL-3" + SENTINEL_5P = "SENTINEL-5P" + SENTINEL_6 = "SENTINEL-6" + SENTINEL_1_RTC = "SENTINEL-1-RTC" + GLOBAL_MOSAICS = "GLOBAL-MOSAICS" + SMOS = "SMOS" + ENVISAT = "ENVISAT" + LANDSAT_5 = "LANDSAT-5" + LANDSAT_7 = "LANDSAT-7" + LANDSAT_8 = "LANDSAT-8" + COP_DEM = "COP-DEM" + TERRAAQUA = "TERRAAQUA" + S2GLC = "S2GLC" + CCM = "CCM" + + +class ODataChecksum(BaseModel): + value: Annotated[str, Field(alias="Value")] + algorithm: Annotated[str, Field(alias="Algorithm")] + checksum_date: Annotated[str, Field(alias="ChecksumDate")] + + +class ODataContentDate(BaseModel): + start: Annotated[str, Field(alias="Start")] + end: Annotated[str, Field(alias="End")] + + +class ODataProduct(BaseModel): + media_content_type: Annotated[str, Field(alias="@odata.mediaContentType")] + id: Annotated[str, Field(alias="Id")] + name: Annotated[str, Field(alias="Name")] + content_type: Annotated[str, Field(alias="ContentType")] + content_length: Annotated[int, Field(alias="ContentLength")] + origin_date: Annotated[str, Field(alias="OriginDate")] + publication_date: Annotated[str, Field(alias="PublicationDate")] + modification_date: Annotated[str, Field(alias="ModificationDate")] + online: Annotated[bool, Field(alias="Online")] + eviction_date: Annotated[str, Field(alias="EvictionDate")] + s3_path: Annotated[str, Field(alias="S3Path")] + checksum: Annotated[list[ODataChecksum], Field(alias="Checksum")] + footprint: Annotated[Geometry | str | None, Field(alias="Footprint")] + geo_footprint: Annotated[Geometry | None, Field(alias="GeoFootprint")] + + +class ODataResult(BaseModel): + odata_context: Annotated[str, Field(alias="@odata.context")] + value: list[ODataProduct] + odata_nextlink: Annotated[str | None, Field(alias="@odata.nextLink")] = None + + +class ODataQuery: + def __init__( + self, + collection: str | None = None, + name: str | None = None, + top: int = 20, + publication_date: tuple[datetime, datetime] | None = None, + sensing_date: tuple[datetime, datetime] | None = None, + intersect_geometry: Geometry | None = None, + online: bool = True, + cloud_cover_less_than: int | None = None, + name_contains: str | None = None, + name_not_contains: str | None = None, + ): + self.collection = collection + self.name = name + self.top = top + self.publication_date = publication_date + self.sensing_date = sensing_date + self.intersect_geometry = intersect_geometry + self.online = online + self.cloud_cover_less_than = cloud_cover_less_than + self.name_contains = name_contains + self.name_not_contains = name_not_contains + + def to_params(self) -> dict: + query = [] + if self.collection: + query.append(f"Collection/Name eq '{self.collection}'") + if self.name: + query.append("Name eq '{self.name}'") + if self.publication_date: + query.append( + f"PublicationDate ge {self.publication_date[0].isoformat()} and PublicationDate le {self.publication_date[1].isoformat()}" + ) + if self.sensing_date: + query.append( + f"ContentDate/Start ge {self.sensing_date[0].isoformat()} and ContentDate/Start le {self.sensing_date[1].isoformat()}" + ) + if self.intersect_geometry: + query.append( + f"intersects(area=geography'SRID=4326;{self.intersect_geometry.wkt}')" + ) + if self.online: + query.append("Online eq true") + if self.cloud_cover_less_than: + query.append( + f"Attributes/OData.CSC.DoubleAttribute/any(att:att/Name eq 'cloudCover' and att/OData.CSC.DoubleAttribute/Value le {self.cloud_cover_less_than})" + ) + if self.name_contains: + query.append(f"contains(Name, '{self.name_contains}')") + if self.name_not_contains: + query.append(f"not contains(Name, '{self.name_not_contains}')") + + return { + "$filter": " and ".join(query), + "$top": self.top, + } + + +class ODataClient: + def __init__(self, url: str): + self.url = url + + def search(self, query: ODataQuery) -> Iterator[ODataProduct]: + response = httpx.get(self.url, params=query.to_params()) + + product_collection = ODataResult.model_validate(response.json()) + yield from product_collection.value diff --git a/tests/conftest.py b/tests/conftest.py index 13ff182..717110b 100644 --- a/tests/conftest.py +++ b/tests/conftest.py @@ -90,3 +90,19 @@ def mock_opensearch_search(respx_mock: respx.MockRouter, opensearch_product_type ).mock(return_value=Response(200, content=data)) return mock + + +@pytest.fixture() +def mock_odata_search( + respx_mock: respx.MockRouter, +): + odata_data = DATA_DIR / "odata.json" + + with open(odata_data) as f: + data = f.read() + + mock = respx_mock.get( + "https://catalogue.dataspace.copernicus.eu/odata/v1/Products" + ).mock(return_value=Response(200, content=data)) + + return mock diff --git a/tests/data/odata.json b/tests/data/odata.json new file mode 100644 index 0000000..f8e17c3 --- /dev/null +++ b/tests/data/odata.json @@ -0,0 +1,1311 @@ +{ + "@odata.context": "$metadata#Products", + "value": [ + { + "@odata.mediaContentType": "application/octet-stream", + "Id": "6a7b999d-1ec3-4149-89de-a80af429b7ea", + "Name": "S2B_MSIL2A_20200101T100319_N0500_R122_T33TXN_20230618T201545.SAFE", + "ContentType": "application/octet-stream", + "ContentLength": 609162793, + "OriginDate": "2023-10-22T01:33:55.166000Z", + "PublicationDate": "2023-10-22T17:13:03.600113Z", + "ModificationDate": "2024-05-07T18:35:15.922185Z", + "Online": true, + "EvictionDate": "9999-12-31T23:59:59.999999Z", + "S3Path": "/eodata/Sentinel-2/MSI/L2A_N0500/2020/01/01/S2B_MSIL2A_20200101T100319_N0500_R122_T33TXN_20230618T201545.SAFE", + "Checksum": [ + { + "Value": "035a4da8c5aff74ece4412f688901e14", + "Algorithm": "MD5", + "ChecksumDate": "2023-10-22T17:13:11.184141Z" + }, + { + "Value": "3134d6657d419e92e897a2fb90ef6158c3449c04a70cd7cacd56fd1d69347089", + "Algorithm": "BLAKE3", + "ChecksumDate": "2023-10-22T17:13:12.491115Z" + } + ], + "ContentDate": { + "Start": "2020-01-01T10:03:19.024000Z", + "End": "2020-01-01T10:03:19.024000Z" + }, + "Footprint": "geography'SRID=4326;POLYGON ((17.2336839042634 47.829740377122, 16.3366002199701 47.8459210520889, 16.3118868855124 46.8581819724645, 16.8000672917402 46.8495140950594, 16.8572847164702 46.9795452504087, 16.9208571798849 47.1246582566163, 16.9600839413645 47.2135726083137, 16.9843364306387 47.2686843221943, 17.0483192159833 47.4136014182965, 17.0762398739841 47.4764988167838, 17.1129664444431 47.5594762327457, 17.1774266379774 47.7043826107559, 17.2336839042634 47.829740377122))'", + "GeoFootprint": { + "type": "Polygon", + "coordinates": [ + [ + [ + 17.2336839042634, + 47.829740377122 + ], + [ + 16.3366002199701, + 47.8459210520889 + ], + [ + 16.3118868855124, + 46.8581819724645 + ], + [ + 16.8000672917402, + 46.8495140950594 + ], + [ + 16.8572847164702, + 46.9795452504087 + ], + [ + 16.9208571798849, + 47.1246582566163 + ], + [ + 16.9600839413645, + 47.2135726083137 + ], + [ + 16.9843364306387, + 47.2686843221943 + ], + [ + 17.0483192159833, + 47.4136014182965 + ], + [ + 17.0762398739841, + 47.4764988167838 + ], + [ + 17.1129664444431, + 47.5594762327457 + ], + [ + 17.1774266379774, + 47.7043826107559 + ], + [ + 17.2336839042634, + 47.829740377122 + ] + ] + ] + } + }, + { + "@odata.mediaContentType": "application/octet-stream", + "Id": "09fb6b18-9491-4a9b-a654-0f67047e854d", + "Name": "S2B_MSIL2A_20200101T100319_N0500_R122_T33UWP_20230618T201545.SAFE", + "ContentType": "application/octet-stream", + "ContentLength": 1199485654, + "OriginDate": "2023-10-22T01:34:22.882000Z", + "PublicationDate": "2023-10-22T17:10:07.189326Z", + "ModificationDate": "2024-05-10T06:25:55.606561Z", + "Online": true, + "EvictionDate": "9999-12-31T23:59:59.999999Z", + "S3Path": "/eodata/Sentinel-2/MSI/L2A_N0500/2020/01/01/S2B_MSIL2A_20200101T100319_N0500_R122_T33UWP_20230618T201545.SAFE", + "Checksum": [ + { + "Value": "acde32ce85687abdffd36d844fdedce8", + "Algorithm": "MD5", + "ChecksumDate": "2023-10-22T17:10:17.581386Z" + }, + { + "Value": "ad65ba09c3e7ceda66141f5de1dace962bfbf519dba2bb54fa8cc9686ef32dca", + "Algorithm": "BLAKE3", + "ChecksumDate": "2023-10-22T17:10:20.148316Z" + } + ], + "ContentDate": { + "Start": "2020-01-01T10:03:19.024000Z", + "End": "2020-01-01T10:03:19.024000Z" + }, + "Footprint": "geography'SRID=4326;POLYGON ((14.9997279041062 48.7530130044756, 14.9997330963449 47.7651665667219, 16.4647868669399 47.7558186458081, 16.4932694755772 48.7433372246506, 14.9997279041062 48.7530130044756))'", + "GeoFootprint": { + "type": "Polygon", + "coordinates": [ + [ + [ + 14.9997279041062, + 48.7530130044756 + ], + [ + 14.9997330963449, + 47.7651665667219 + ], + [ + 16.4647868669399, + 47.7558186458081 + ], + [ + 16.4932694755772, + 48.7433372246506 + ], + [ + 14.9997279041062, + 48.7530130044756 + ] + ] + ] + } + }, + { + "@odata.mediaContentType": "application/octet-stream", + "Id": "e6162844-d274-4c49-b0f3-292d63a674dd", + "Name": "S2B_MSIL2A_20200101T100319_N0500_R122_T33TWN_20230618T201545.SAFE", + "ContentType": "application/octet-stream", + "ContentLength": 1210847910, + "OriginDate": "2023-10-22T01:33:34.992000Z", + "PublicationDate": "2023-10-22T17:10:02.294908Z", + "ModificationDate": "2024-05-10T06:25:55.515371Z", + "Online": true, + "EvictionDate": "9999-12-31T23:59:59.999999Z", + "S3Path": "/eodata/Sentinel-2/MSI/L2A_N0500/2020/01/01/S2B_MSIL2A_20200101T100319_N0500_R122_T33TWN_20230618T201545.SAFE", + "Checksum": [ + { + "Value": "05c79c5b089fef75bfc1b14e6e5b0a58", + "Algorithm": "MD5", + "ChecksumDate": "2023-10-22T17:10:12.641196Z" + }, + { + "Value": "a91cf99a3467d5ffb7c15ddf0907a4f454b606cb2a1e45938f16d94ad5326133", + "Algorithm": "BLAKE3", + "ChecksumDate": "2023-10-22T17:10:15.265251Z" + } + ], + "ContentDate": { + "Start": "2020-01-01T10:03:19.024000Z", + "End": "2020-01-01T10:03:19.024000Z" + }, + "Footprint": "geography'SRID=4326;POLYGON ((14.9997326423426 47.8537018424875, 14.9997375874494 46.8656998733542, 16.44014982441 46.8566398819074, 16.4672773767682 47.8443250465141, 14.9997326423426 47.8537018424875))'", + "GeoFootprint": { + "type": "Polygon", + "coordinates": [ + [ + [ + 14.9997326423426, + 47.8537018424875 + ], + [ + 14.9997375874494, + 46.8656998733542 + ], + [ + 16.44014982441, + 46.8566398819074 + ], + [ + 16.4672773767682, + 47.8443250465141 + ], + [ + 14.9997326423426, + 47.8537018424875 + ] + ] + ] + } + }, + { + "@odata.mediaContentType": "application/octet-stream", + "Id": "239e4f90-bae7-4d38-8101-833620b6e445", + "Name": "S2B_MSIL2A_20200108T095309_N0500_R079_T33UWP_20230625T151949.SAFE", + "ContentType": "application/octet-stream", + "ContentLength": 594798475, + "OriginDate": "2023-10-23T16:48:50.324000Z", + "PublicationDate": "2023-10-24T15:15:03.190086Z", + "ModificationDate": "2024-05-09T22:30:18.474118Z", + "Online": true, + "EvictionDate": "9999-12-31T23:59:59.999999Z", + "S3Path": "/eodata/Sentinel-2/MSI/L2A_N0500/2020/01/08/S2B_MSIL2A_20200108T095309_N0500_R079_T33UWP_20230625T151949.SAFE", + "Checksum": [ + { + "Value": "d2a0f56b324254c39773a72facfea931", + "Algorithm": "MD5", + "ChecksumDate": "2023-10-24T15:15:11.522078Z" + }, + { + "Value": "88e543845684da523e3541d8035697f519fb403d48ac4d02a3d87ea48d5868c1", + "Algorithm": "BLAKE3", + "ChecksumDate": "2023-10-24T15:15:12.838224Z" + } + ], + "ContentDate": { + "Start": "2020-01-08T09:53:09.024000Z", + "End": "2020-01-08T09:53:09.024000Z" + }, + "Footprint": "geography'SRID=4326;POLYGON ((15.6393372379527 47.7610855090489, 16.4647868669399 47.7558186458081, 16.4932694755772 48.7433372246506, 16.0048399385611 48.7465014731392, 15.9556396836027 48.6151030714214, 15.9003652718623 48.4688915703488, 15.8452584004835 48.3226487363508, 15.7910774315634 48.1761737026552, 15.7369834952033 48.0297483956691, 15.6835510958982 47.8832082920933, 15.6393372379527 47.7610855090489))'", + "GeoFootprint": { + "type": "Polygon", + "coordinates": [ + [ + [ + 15.6393372379527, + 47.7610855090489 + ], + [ + 16.4647868669399, + 47.7558186458081 + ], + [ + 16.4932694755772, + 48.7433372246506 + ], + [ + 16.0048399385611, + 48.7465014731392 + ], + [ + 15.9556396836027, + 48.6151030714214 + ], + [ + 15.9003652718623, + 48.4688915703488 + ], + [ + 15.8452584004835, + 48.3226487363508 + ], + [ + 15.7910774315634, + 48.1761737026552 + ], + [ + 15.7369834952033, + 48.0297483956691 + ], + [ + 15.6835510958982, + 47.8832082920933 + ], + [ + 15.6393372379527, + 47.7610855090489 + ] + ] + ] + } + }, + { + "@odata.mediaContentType": "application/octet-stream", + "Id": "1ccdde6e-4200-45d8-a314-c9642a259f3c", + "Name": "S2A_MSIL2A_20200106T100401_N0500_R122_T33UXP_20230422T061153.SAFE", + "ContentType": "application/octet-stream", + "ContentLength": 890069769, + "OriginDate": "2023-10-21T14:56:57.700000Z", + "PublicationDate": "2023-10-22T04:53:44.186636Z", + "ModificationDate": "2024-05-09T21:38:54.763463Z", + "Online": true, + "EvictionDate": "9999-12-31T23:59:59.999999Z", + "S3Path": "/eodata/Sentinel-2/MSI/L2A_N0500/2020/01/06/S2A_MSIL2A_20200106T100401_N0500_R122_T33UXP_20230422T061153.SAFE", + "Checksum": [ + { + "Value": "28647b804d788964a7578d098d6315dc", + "Algorithm": "MD5", + "ChecksumDate": "2023-10-22T04:53:52.905237Z" + }, + { + "Value": "c519fcc231355deb46bbf1d2bc5af7036d96dfffe659937e0ff868d82c8bfe87", + "Algorithm": "BLAKE3", + "ChecksumDate": "2023-10-22T04:53:54.783875Z" + } + ], + "ContentDate": { + "Start": "2020-01-06T10:04:01.024000Z", + "End": "2020-01-06T10:04:01.024000Z" + }, + "Footprint": "geography'SRID=4326;POLYGON ((17.6468514477348 48.721454634099, 16.3602792462837 48.7449841116978, 16.3343313489668 47.7574097373474, 17.1991857657058 47.7418320068618, 17.2219760106321 47.792224341334, 17.2881193403055 47.9371876551025, 17.3541563276349 48.0821312110422, 17.4201186872331 48.2269985039551, 17.486383828653 48.37180412591, 17.5528565086633 48.5165521869992, 17.6099806120847 48.641260822878, 17.6190615955206 48.661203866567, 17.636729773245 48.6994673745006, 17.6468514477348 48.721454634099))'", + "GeoFootprint": { + "type": "Polygon", + "coordinates": [ + [ + [ + 17.6468514477348, + 48.721454634099 + ], + [ + 16.3602792462837, + 48.7449841116978 + ], + [ + 16.3343313489668, + 47.7574097373474 + ], + [ + 17.1991857657058, + 47.7418320068618 + ], + [ + 17.2219760106321, + 47.792224341334 + ], + [ + 17.2881193403055, + 47.9371876551025 + ], + [ + 17.3541563276349, + 48.0821312110422 + ], + [ + 17.4201186872331, + 48.2269985039551 + ], + [ + 17.486383828653, + 48.37180412591 + ], + [ + 17.5528565086633, + 48.5165521869992 + ], + [ + 17.6099806120847, + 48.641260822878 + ], + [ + 17.6190615955206, + 48.661203866567 + ], + [ + 17.636729773245, + 48.6994673745006 + ], + [ + 17.6468514477348, + 48.721454634099 + ] + ] + ] + } + }, + { + "@odata.mediaContentType": "application/octet-stream", + "Id": "9b118d8a-5d03-47a9-b42e-ce7e70b757a1", + "Name": "S2B_MSIL2A_20200111T100259_N0500_R122_T33TWN_20230612T042427.SAFE", + "ContentType": "application/octet-stream", + "ContentLength": 1165876674, + "OriginDate": "2023-10-25T03:03:40.445000Z", + "PublicationDate": "2023-10-26T01:41:23.984072Z", + "ModificationDate": "2024-05-09T22:54:09.610720Z", + "Online": true, + "EvictionDate": "9999-12-31T23:59:59.999999Z", + "S3Path": "/eodata/Sentinel-2/MSI/L2A_N0500/2020/01/11/S2B_MSIL2A_20200111T100259_N0500_R122_T33TWN_20230612T042427.SAFE", + "Checksum": [ + { + "Value": "e02a56b340ea956ad98d4f1281f78a06", + "Algorithm": "MD5", + "ChecksumDate": "2023-10-26T01:41:34.993036Z" + }, + { + "Value": "aedebfebcd1d27e5dcc38c9421a26af6c8f4f5d7af57e865433d5d3b4e5e1fe3", + "Algorithm": "BLAKE3", + "ChecksumDate": "2023-10-26T01:41:38.178757Z" + } + ], + "ContentDate": { + "Start": "2020-01-11T10:02:59.024000Z", + "End": "2020-01-11T10:02:59.024000Z" + }, + "Footprint": "geography'SRID=4326;POLYGON ((14.9997326423426 47.8537018424875, 14.9997375874494 46.8656998733542, 16.44014982441 46.8566398819074, 16.4672773767682 47.8443250465141, 14.9997326423426 47.8537018424875))'", + "GeoFootprint": { + "type": "Polygon", + "coordinates": [ + [ + [ + 14.9997326423426, + 47.8537018424875 + ], + [ + 14.9997375874494, + 46.8656998733542 + ], + [ + 16.44014982441, + 46.8566398819074 + ], + [ + 16.4672773767682, + 47.8443250465141 + ], + [ + 14.9997326423426, + 47.8537018424875 + ] + ] + ] + } + }, + { + "@odata.mediaContentType": "application/octet-stream", + "Id": "e582011c-013f-4879-a443-f4ae01e73b54", + "Name": "S2A_MSIL2A_20200106T100401_N0500_R122_T33TXN_20230422T061153.SAFE", + "ContentType": "application/octet-stream", + "ContentLength": 620404678, + "OriginDate": "2023-10-21T15:08:44.572000Z", + "PublicationDate": "2023-10-22T04:58:01.794627Z", + "ModificationDate": "2024-05-09T21:38:59.825888Z", + "Online": true, + "EvictionDate": "9999-12-31T23:59:59.999999Z", + "S3Path": "/eodata/Sentinel-2/MSI/L2A_N0500/2020/01/06/S2A_MSIL2A_20200106T100401_N0500_R122_T33TXN_20230422T061153.SAFE", + "Checksum": [ + { + "Value": "69170ee8eaffa2d6b49c576313e35505", + "Algorithm": "MD5", + "ChecksumDate": "2023-10-22T04:58:10.092068Z" + }, + { + "Value": "0019a7a2665c22b7b126d1437d44567aee3b41ac53d929b4cc287e2608a3eb54", + "Algorithm": "BLAKE3", + "ChecksumDate": "2023-10-22T04:58:11.955166Z" + } + ], + "ContentDate": { + "Start": "2020-01-06T10:04:01.024000Z", + "End": "2020-01-06T10:04:01.024000Z" + }, + "Footprint": "geography'SRID=4326;POLYGON ((17.2390495317073 47.82964359744, 16.3366002199701 47.8459210520889, 16.3118868855124 46.8581819724645, 16.8040960965018 46.8494425616973, 16.8355280088746 46.9221333986721, 16.8988310179161 47.0671699124874, 16.9628527568496 47.2121300843441, 17.0270650973019 47.3571402296377, 17.091495081771 47.5021675970775, 17.1563957598192 47.6472174778964, 17.2219760106321 47.792224341334, 17.2390495317073 47.82964359744))'", + "GeoFootprint": { + "type": "Polygon", + "coordinates": [ + [ + [ + 17.2390495317073, + 47.82964359744 + ], + [ + 16.3366002199701, + 47.8459210520889 + ], + [ + 16.3118868855124, + 46.8581819724645 + ], + [ + 16.8040960965018, + 46.8494425616973 + ], + [ + 16.8355280088746, + 46.9221333986721 + ], + [ + 16.8988310179161, + 47.0671699124874 + ], + [ + 16.9628527568496, + 47.2121300843441 + ], + [ + 17.0270650973019, + 47.3571402296377 + ], + [ + 17.091495081771, + 47.5021675970775 + ], + [ + 17.1563957598192, + 47.6472174778964 + ], + [ + 17.2219760106321, + 47.792224341334 + ], + [ + 17.2390495317073, + 47.82964359744 + ] + ] + ] + } + }, + { + "@odata.mediaContentType": "application/octet-stream", + "Id": "347fcdbf-d81e-46e2-880a-aa7017aa8e49", + "Name": "S2B_MSIL2A_20200111T100259_N0500_R122_T33UWP_20230612T042427.SAFE", + "ContentType": "application/octet-stream", + "ContentLength": 1126049530, + "OriginDate": "2023-10-25T02:56:38.024000Z", + "PublicationDate": "2023-10-26T01:37:39.468376Z", + "ModificationDate": "2024-05-09T22:54:05.141426Z", + "Online": true, + "EvictionDate": "9999-12-31T23:59:59.999999Z", + "S3Path": "/eodata/Sentinel-2/MSI/L2A_N0500/2020/01/11/S2B_MSIL2A_20200111T100259_N0500_R122_T33UWP_20230612T042427.SAFE", + "Checksum": [ + { + "Value": "bacd3503287c4fd1fe1d8a9ad352861e", + "Algorithm": "MD5", + "ChecksumDate": "2023-10-26T01:37:50.242341Z" + }, + { + "Value": "f545dec7d90683d48cc4b201d00185974d6e5108e7a22e73d4d1fa5bf5d02b3c", + "Algorithm": "BLAKE3", + "ChecksumDate": "2023-10-26T01:37:52.385634Z" + } + ], + "ContentDate": { + "Start": "2020-01-11T10:02:59.024000Z", + "End": "2020-01-11T10:02:59.024000Z" + }, + "Footprint": "geography'SRID=4326;POLYGON ((14.9997279041062 48.7530130044756, 14.9997330963449 47.7651665667219, 16.4647868669399 47.7558186458081, 16.4932694755772 48.7433372246506, 14.9997279041062 48.7530130044756))'", + "GeoFootprint": { + "type": "Polygon", + "coordinates": [ + [ + [ + 14.9997279041062, + 48.7530130044756 + ], + [ + 14.9997330963449, + 47.7651665667219 + ], + [ + 16.4647868669399, + 47.7558186458081 + ], + [ + 16.4932694755772, + 48.7433372246506 + ], + [ + 14.9997279041062, + 48.7530130044756 + ] + ] + ] + } + }, + { + "@odata.mediaContentType": "application/octet-stream", + "Id": "f337fa1d-fb06-4173-8137-aa939db04233", + "Name": "S2B_MSIL2A_20200108T095309_N0500_R079_T33TWN_20230625T151949.SAFE", + "ContentType": "application/octet-stream", + "ContentLength": 913369695, + "OriginDate": "2023-10-23T16:59:55.262000Z", + "PublicationDate": "2023-10-24T15:26:19.618788Z", + "ModificationDate": "2024-05-09T22:31:07.595678Z", + "Online": true, + "EvictionDate": "9999-12-31T23:59:59.999999Z", + "S3Path": "/eodata/Sentinel-2/MSI/L2A_N0500/2020/01/08/S2B_MSIL2A_20200108T095309_N0500_R079_T33TWN_20230625T151949.SAFE", + "Checksum": [ + { + "Value": "42318715d6af1decf702ed21b1aafa8d", + "Algorithm": "MD5", + "ChecksumDate": "2023-10-24T15:26:33.094927Z" + }, + { + "Value": "977918ed93d54a8bc73c63adc2040955ce4443050779839b552197a8256440c6", + "Algorithm": "BLAKE3", + "ChecksumDate": "2023-10-24T15:26:35.017466Z" + } + ], + "ContentDate": { + "Start": "2020-01-08T09:53:09.024000Z", + "End": "2020-01-08T09:53:09.024000Z" + }, + "Footprint": "geography'SRID=4326;POLYGON ((15.3140644031822 46.8637228016598, 16.44014982441 46.8566398819074, 16.4672773767682 47.8443250465141, 15.6713149081164 47.8494108047169, 15.6304976592402 47.7366697714618, 15.5770273105775 47.590323431071, 15.5232892981939 47.4441476311728, 15.4709798888779 47.2976162588032, 15.4170533098573 47.1516466375142, 15.3646084052304 47.0053070039575, 15.3140644031822 46.8637228016598))'", + "GeoFootprint": { + "type": "Polygon", + "coordinates": [ + [ + [ + 15.3140644031822, + 46.8637228016598 + ], + [ + 16.44014982441, + 46.8566398819074 + ], + [ + 16.4672773767682, + 47.8443250465141 + ], + [ + 15.6713149081164, + 47.8494108047169 + ], + [ + 15.6304976592402, + 47.7366697714618 + ], + [ + 15.5770273105775, + 47.590323431071 + ], + [ + 15.5232892981939, + 47.4441476311728 + ], + [ + 15.4709798888779, + 47.2976162588032 + ], + [ + 15.4170533098573, + 47.1516466375142 + ], + [ + 15.3646084052304, + 47.0053070039575 + ], + [ + 15.3140644031822, + 46.8637228016598 + ] + ] + ] + } + }, + { + "@odata.mediaContentType": "application/octet-stream", + "Id": "85fbbe0f-1ec8-4cba-95f2-b87e0a0fda75", + "Name": "S2B_MSIL2A_20200111T100259_N0500_R122_T33UXP_20230612T042427.SAFE", + "ContentType": "application/octet-stream", + "ContentLength": 890301085, + "OriginDate": "2023-10-25T02:53:21.740000Z", + "PublicationDate": "2023-10-26T01:27:27.631443Z", + "ModificationDate": "2024-05-09T22:53:42.373292Z", + "Online": true, + "EvictionDate": "9999-12-31T23:59:59.999999Z", + "S3Path": "/eodata/Sentinel-2/MSI/L2A_N0500/2020/01/11/S2B_MSIL2A_20200111T100259_N0500_R122_T33UXP_20230612T042427.SAFE", + "Checksum": [ + { + "Value": "d4c73ed733c796c0639f240a81275894", + "Algorithm": "MD5", + "ChecksumDate": "2023-10-26T01:27:36.978328Z" + }, + { + "Value": "9ef47d55e55290b611cda78e261076376f48055c12df2a2ef5cd1b2739c30ce9", + "Algorithm": "BLAKE3", + "ChecksumDate": "2023-10-26T01:27:39.405480Z" + } + ], + "ContentDate": { + "Start": "2020-01-11T10:02:59.024000Z", + "End": "2020-01-11T10:02:59.024000Z" + }, + "Footprint": "geography'SRID=4326;POLYGON ((17.6433864520917 48.7215180036769, 16.3602792462837 48.7449841116978, 16.3343313489668 47.7574097373474, 17.1963237772308 47.7418835569079, 17.2337745010312 47.8246086664865, 17.2994912564101 47.9695613059589, 17.3656540448265 48.1144314468392, 17.4318283026065 48.2593135822616, 17.4938275423244 48.3947625671256, 17.4976714824224 48.403195070939, 17.5165513631234 48.4444849360713, 17.5642682481899 48.5489332288167, 17.630561345317 48.6937778949669, 17.6433864520917 48.7215180036769))'", + "GeoFootprint": { + "type": "Polygon", + "coordinates": [ + [ + [ + 17.6433864520917, + 48.7215180036769 + ], + [ + 16.3602792462837, + 48.7449841116978 + ], + [ + 16.3343313489668, + 47.7574097373474 + ], + [ + 17.1963237772308, + 47.7418835569079 + ], + [ + 17.2337745010312, + 47.8246086664865 + ], + [ + 17.2994912564101, + 47.9695613059589 + ], + [ + 17.3656540448265, + 48.1144314468392 + ], + [ + 17.4318283026065, + 48.2593135822616 + ], + [ + 17.4938275423244, + 48.3947625671256 + ], + [ + 17.4976714824224, + 48.403195070939 + ], + [ + 17.5165513631234, + 48.4444849360713 + ], + [ + 17.5642682481899, + 48.5489332288167 + ], + [ + 17.630561345317, + 48.6937778949669 + ], + [ + 17.6433864520917, + 48.7215180036769 + ] + ] + ] + } + }, + { + "@odata.mediaContentType": "application/octet-stream", + "Id": "f536fc53-1eab-45c2-b88e-6ad234e4bb78", + "Name": "S2A_MSIL2A_20200103T095401_N0500_R079_T33TWN_20230611T200138.SAFE", + "ContentType": "application/octet-stream", + "ContentLength": 811719155, + "OriginDate": "2023-10-24T22:50:45.328000Z", + "PublicationDate": "2023-10-25T21:46:04.324540Z", + "ModificationDate": "2024-05-07T18:40:24.856528Z", + "Online": true, + "EvictionDate": "9999-12-31T23:59:59.999999Z", + "S3Path": "/eodata/Sentinel-2/MSI/L2A_N0500/2020/01/03/S2A_MSIL2A_20200103T095401_N0500_R079_T33TWN_20230611T200138.SAFE", + "Checksum": [ + { + "Value": "80697bc95613d8b7b1862b6da5a79573", + "Algorithm": "MD5", + "ChecksumDate": "2023-10-25T21:46:14.186056Z" + }, + { + "Value": "827508789e5f64be6a527574333ae1b61aa87373c4961b0f6f81028095c4c86e", + "Algorithm": "BLAKE3", + "ChecksumDate": "2023-10-25T21:46:15.930260Z" + } + ], + "ContentDate": { + "Start": "2020-01-03T09:54:01.024000Z", + "End": "2020-01-03T09:54:01.024000Z" + }, + "Footprint": "geography'SRID=4326;POLYGON ((15.3181902735537 46.8636968505124, 16.44014982441 46.8566398819074, 16.4672773767682 47.8443250465141, 15.6768790249519 47.8493752530999, 15.6546062669209 47.7869713103839, 15.6007275220728 47.640793756014, 15.5591307836325 47.5245935883165, 15.5483941517894 47.4941738477431, 15.5278422371206 47.4376037063134, 15.4954918366265 47.3478893967255, 15.4418568055002 47.2017476033971, 15.3874957028187 47.0557552261628, 15.3365886153815 46.9149840865142, 15.3345316684965 46.9092445524639, 15.3297437934646 46.8959357101121, 15.3181902735537 46.8636968505124))'", + "GeoFootprint": { + "type": "Polygon", + "coordinates": [ + [ + [ + 15.3181902735537, + 46.8636968505124 + ], + [ + 16.44014982441, + 46.8566398819074 + ], + [ + 16.4672773767682, + 47.8443250465141 + ], + [ + 15.6768790249519, + 47.8493752530999 + ], + [ + 15.6546062669209, + 47.7869713103839 + ], + [ + 15.6007275220728, + 47.640793756014 + ], + [ + 15.5591307836325, + 47.5245935883165 + ], + [ + 15.5483941517894, + 47.4941738477431 + ], + [ + 15.5278422371206, + 47.4376037063134 + ], + [ + 15.4954918366265, + 47.3478893967255 + ], + [ + 15.4418568055002, + 47.2017476033971 + ], + [ + 15.3874957028187, + 47.0557552261628 + ], + [ + 15.3365886153815, + 46.9149840865142 + ], + [ + 15.3345316684965, + 46.9092445524639 + ], + [ + 15.3297437934646, + 46.8959357101121 + ], + [ + 15.3181902735537, + 46.8636968505124 + ] + ] + ] + } + }, + { + "@odata.mediaContentType": "application/octet-stream", + "Id": "5ca0c73f-f930-45d1-9a47-e8eba393e385", + "Name": "S2A_MSIL2A_20200106T100401_N0500_R122_T33TWN_20230422T061153.SAFE", + "ContentType": "application/octet-stream", + "ContentLength": 1234575518, + "OriginDate": "2023-10-21T15:15:07.088000Z", + "PublicationDate": "2023-10-22T05:08:40.915719Z", + "ModificationDate": "2024-05-09T22:35:42.566847Z", + "Online": true, + "EvictionDate": "9999-12-31T23:59:59.999999Z", + "S3Path": "/eodata/Sentinel-2/MSI/L2A_N0500/2020/01/06/S2A_MSIL2A_20200106T100401_N0500_R122_T33TWN_20230422T061153.SAFE", + "Checksum": [ + { + "Value": "42f7d556b055c231c7e07a93e92078ec", + "Algorithm": "MD5", + "ChecksumDate": "2023-10-24T17:12:51.223123Z" + }, + { + "Value": "6c5204f61c048b817402753977bf95b79473715f5ee62c015639463d4ecd9cf6", + "Algorithm": "BLAKE3", + "ChecksumDate": "2023-10-24T17:12:55.245333Z" + } + ], + "ContentDate": { + "Start": "2020-01-06T10:04:01.024000Z", + "End": "2020-01-06T10:04:01.024000Z" + }, + "Footprint": "geography'SRID=4326;POLYGON ((14.9997326423426 47.8537018424875, 14.9997375874494 46.8656998733542, 16.44014982441 46.8566398819074, 16.4672773767682 47.8443250465141, 14.9997326423426 47.8537018424875))'", + "GeoFootprint": { + "type": "Polygon", + "coordinates": [ + [ + [ + 14.9997326423426, + 47.8537018424875 + ], + [ + 14.9997375874494, + 46.8656998733542 + ], + [ + 16.44014982441, + 46.8566398819074 + ], + [ + 16.4672773767682, + 47.8443250465141 + ], + [ + 14.9997326423426, + 47.8537018424875 + ] + ] + ] + } + }, + { + "@odata.mediaContentType": "application/octet-stream", + "Id": "f62c778b-05a5-45cb-8dd8-f71ff2dd96cd", + "Name": "S2B_MSIL2A_20200108T095309_N0500_R079_T33UXP_20230625T151949.SAFE", + "ContentType": "application/octet-stream", + "ContentLength": 1164077209, + "OriginDate": "2023-10-23T16:50:49.320000Z", + "PublicationDate": "2023-10-24T15:23:38.000738Z", + "ModificationDate": "2024-05-09T22:30:49.962505Z", + "Online": true, + "EvictionDate": "9999-12-31T23:59:59.999999Z", + "S3Path": "/eodata/Sentinel-2/MSI/L2A_N0500/2020/01/08/S2B_MSIL2A_20200108T095309_N0500_R079_T33UXP_20230625T151949.SAFE", + "Checksum": [ + { + "Value": "10226feb826d98e562aef6181ffa34e5", + "Algorithm": "MD5", + "ChecksumDate": "2023-10-24T15:23:54.270147Z" + }, + { + "Value": "20ebf21c9014876275429c92f66a2d0ab0a6654569bd9a15af497315ba2edd1d", + "Algorithm": "BLAKE3", + "ChecksumDate": "2023-10-24T15:23:57.449338Z" + } + ], + "ContentDate": { + "Start": "2020-01-08T09:53:09.024000Z", + "End": "2020-01-08T09:53:09.024000Z" + }, + "Footprint": "geography'SRID=4326;POLYGON ((16.3602792462837 48.7449841116978, 16.3343313489668 47.7574097373474, 17.7980947153029 47.7310444777451, 17.8524387084731 48.7176947511785, 16.3602792462837 48.7449841116978))'", + "GeoFootprint": { + "type": "Polygon", + "coordinates": [ + [ + [ + 16.3602792462837, + 48.7449841116978 + ], + [ + 16.3343313489668, + 47.7574097373474 + ], + [ + 17.7980947153029, + 47.7310444777451 + ], + [ + 17.8524387084731, + 48.7176947511785 + ], + [ + 16.3602792462837, + 48.7449841116978 + ] + ] + ] + } + }, + { + "@odata.mediaContentType": "application/octet-stream", + "Id": "717461b8-228f-4550-acad-de0357a11337", + "Name": "S2B_MSIL2A_20200101T100319_N0500_R122_T33UXP_20230618T201545.SAFE", + "ContentType": "application/octet-stream", + "ContentLength": 921943209, + "OriginDate": "2023-10-22T01:25:31.919000Z", + "PublicationDate": "2023-10-22T16:59:16.607319Z", + "ModificationDate": "2024-05-10T06:25:46.567852Z", + "Online": true, + "EvictionDate": "9999-12-31T23:59:59.999999Z", + "S3Path": "/eodata/Sentinel-2/MSI/L2A_N0500/2020/01/01/S2B_MSIL2A_20200101T100319_N0500_R122_T33UXP_20230618T201545.SAFE", + "Checksum": [ + { + "Value": "0feb9fbcb4b60135b44a3761b4cf9ed8", + "Algorithm": "MD5", + "ChecksumDate": "2023-10-22T16:59:25.895602Z" + }, + { + "Value": "39d264132c3f2eba27bcc9872d220e0b691660630f6403dee1eb7a58997ab453", + "Algorithm": "BLAKE3", + "ChecksumDate": "2023-10-22T16:59:27.956414Z" + } + ], + "ContentDate": { + "Start": "2020-01-01T10:03:19.024000Z", + "End": "2020-01-01T10:03:19.024000Z" + }, + "Footprint": "geography'SRID=4326;POLYGON ((17.6433668975382 48.7215183613004, 16.3602792462837 48.7449841116978, 16.3343313489668 47.7574097373474, 17.1942726554598 47.7419205016486, 17.2424419655026 47.8492559182622, 17.3079056990768 47.9941507563829, 17.3738883253615 48.1390610535992, 17.4404033712745 48.2839847336994, 17.507383401301 48.4288820912415, 17.5744493318599 48.5737806564574, 17.6420180088231 48.7185860249992, 17.6433668975382 48.7215183613004))'", + "GeoFootprint": { + "type": "Polygon", + "coordinates": [ + [ + [ + 17.6433668975382, + 48.7215183613004 + ], + [ + 16.3602792462837, + 48.7449841116978 + ], + [ + 16.3343313489668, + 47.7574097373474 + ], + [ + 17.1942726554598, + 47.7419205016486 + ], + [ + 17.2424419655026, + 47.8492559182622 + ], + [ + 17.3079056990768, + 47.9941507563829 + ], + [ + 17.3738883253615, + 48.1390610535992 + ], + [ + 17.4404033712745, + 48.2839847336994 + ], + [ + 17.507383401301, + 48.4288820912415 + ], + [ + 17.5744493318599, + 48.5737806564574 + ], + [ + 17.6420180088231, + 48.7185860249992 + ], + [ + 17.6433668975382, + 48.7215183613004 + ] + ] + ] + } + }, + { + "@odata.mediaContentType": "application/octet-stream", + "Id": "961c2fae-b85b-47b8-ab6b-fb94ab6cb7d4", + "Name": "S2B_MSIL2A_20200111T100259_N0500_R122_T33TXN_20230612T042427.SAFE", + "ContentType": "application/octet-stream", + "ContentLength": 590840291, + "OriginDate": "2023-10-25T02:55:24.272000Z", + "PublicationDate": "2023-10-26T01:35:26.160689Z", + "ModificationDate": "2024-05-09T22:53:51.052686Z", + "Online": true, + "EvictionDate": "9999-12-31T23:59:59.999999Z", + "S3Path": "/eodata/Sentinel-2/MSI/L2A_N0500/2020/01/11/S2B_MSIL2A_20200111T100259_N0500_R122_T33TXN_20230612T042427.SAFE", + "Checksum": [ + { + "Value": "e06a4e5ce58f1724a72296caa47c8a43", + "Algorithm": "MD5", + "ChecksumDate": "2023-10-26T01:35:36.407291Z" + }, + { + "Value": "095ef07a28aff2be7679985e54ef4e9ee03fc87494f3ac1708d2424dc2de48d5", + "Algorithm": "BLAKE3", + "ChecksumDate": "2023-10-26T01:35:37.691294Z" + } + ], + "ContentDate": { + "Start": "2020-01-11T10:02:59.024000Z", + "End": "2020-01-11T10:02:59.024000Z" + }, + "Footprint": "geography'SRID=4326;POLYGON ((17.2360814441433 47.8296971327578, 16.3366002199701 47.8459210520889, 16.3118868855124 46.8581819724645, 16.8006898334783 46.849503041532, 16.8464066077708 46.9544932815473, 16.9097094622636 47.0995846483367, 16.9736515611087 47.2446279565575, 17.0381276327458 47.3896123472367, 17.102897451692 47.5346477317322, 17.1681440008669 47.6796370940618, 17.2337745010312 47.8246086664865, 17.2360814441433 47.8296971327578))'", + "GeoFootprint": { + "type": "Polygon", + "coordinates": [ + [ + [ + 17.2360814441433, + 47.8296971327578 + ], + [ + 16.3366002199701, + 47.8459210520889 + ], + [ + 16.3118868855124, + 46.8581819724645 + ], + [ + 16.8006898334783, + 46.849503041532 + ], + [ + 16.8464066077708, + 46.9544932815473 + ], + [ + 16.9097094622636, + 47.0995846483367 + ], + [ + 16.9736515611087, + 47.2446279565575 + ], + [ + 17.0381276327458, + 47.3896123472367 + ], + [ + 17.102897451692, + 47.5346477317322 + ], + [ + 17.1681440008669, + 47.6796370940618 + ], + [ + 17.2337745010312, + 47.8246086664865 + ], + [ + 17.2360814441433, + 47.8296971327578 + ] + ] + ] + } + }, + { + "@odata.mediaContentType": "application/octet-stream", + "Id": "c62ded0d-21db-4fac-bc9b-4dcce7c096b6", + "Name": "S2A_MSIL2A_20200116T100341_N0500_R122_T33TWN_20230429T105314.SAFE", + "ContentType": "application/octet-stream", + "ContentLength": 1156957217, + "OriginDate": "2023-10-24T10:36:20.451000Z", + "PublicationDate": "2023-10-25T08:53:38.988522Z", + "ModificationDate": "2024-05-09T22:46:19.962183Z", + "Online": true, + "EvictionDate": "9999-12-31T23:59:59.999999Z", + "S3Path": "/eodata/Sentinel-2/MSI/L2A_N0500/2020/01/16/S2A_MSIL2A_20200116T100341_N0500_R122_T33TWN_20230429T105314.SAFE", + "Checksum": [ + { + "Value": "ba76b991690af4b905390749cdf3c717", + "Algorithm": "MD5", + "ChecksumDate": "2023-10-25T08:54:02.180412Z" + }, + { + "Value": "a53c8c4d20569195df0911a85ec927404d4e40a087ce07e352c970fbf1c75418", + "Algorithm": "BLAKE3", + "ChecksumDate": "2023-10-25T08:54:04.787811Z" + } + ], + "ContentDate": { + "Start": "2020-01-16T10:03:41.024000Z", + "End": "2020-01-16T10:03:41.024000Z" + }, + "Footprint": "geography'SRID=4326;POLYGON ((14.9997326423426 47.8537018424875, 14.9997375874494 46.8656998733542, 16.44014982441 46.8566398819074, 16.4672773767682 47.8443250465141, 14.9997326423426 47.8537018424875))'", + "GeoFootprint": { + "type": "Polygon", + "coordinates": [ + [ + [ + 14.9997326423426, + 47.8537018424875 + ], + [ + 14.9997375874494, + 46.8656998733542 + ], + [ + 16.44014982441, + 46.8566398819074 + ], + [ + 16.4672773767682, + 47.8443250465141 + ], + [ + 14.9997326423426, + 47.8537018424875 + ] + ] + ] + } + }, + { + "@odata.mediaContentType": "application/octet-stream", + "Id": "4210103d-0850-4305-9887-cb89dba56130", + "Name": "S2B_MSIL2A_20200108T095309_N0500_R079_T33TXN_20230625T151949.SAFE", + "ContentType": "application/octet-stream", + "ContentLength": 1168223146, + "OriginDate": "2023-10-23T16:59:37.107000Z", + "PublicationDate": "2023-10-24T15:27:36.830593Z", + "ModificationDate": "2024-05-09T22:31:11.227221Z", + "Online": true, + "EvictionDate": "9999-12-31T23:59:59.999999Z", + "S3Path": "/eodata/Sentinel-2/MSI/L2A_N0500/2020/01/08/S2B_MSIL2A_20200108T095309_N0500_R079_T33TXN_20230625T151949.SAFE", + "Checksum": [ + { + "Value": "5bea9f114ae44a5a570adaaab246e323", + "Algorithm": "MD5", + "ChecksumDate": "2023-10-24T15:27:53.077701Z" + }, + { + "Value": "67f60a8e1c3dfb5b8f087632fbbb370f44173cc753a9dde1fbb2b85f9a790cb3", + "Algorithm": "BLAKE3", + "ChecksumDate": "2023-10-24T15:27:55.686134Z" + } + ], + "ContentDate": { + "Start": "2020-01-08T09:53:09.024000Z", + "End": "2020-01-08T09:53:09.024000Z" + }, + "Footprint": "geography'SRID=4326;POLYGON ((16.3366002199701 47.8459210520889, 16.3118868855124 46.8581819724645, 17.7510849986202 46.8326283192514, 17.8028466829245 47.8194744029593, 16.3366002199701 47.8459210520889))'", + "GeoFootprint": { + "type": "Polygon", + "coordinates": [ + [ + [ + 16.3366002199701, + 47.8459210520889 + ], + [ + 16.3118868855124, + 46.8581819724645 + ], + [ + 17.7510849986202, + 46.8326283192514 + ], + [ + 17.8028466829245, + 47.8194744029593 + ], + [ + 16.3366002199701, + 47.8459210520889 + ] + ] + ] + } + }, + { + "@odata.mediaContentType": "application/octet-stream", + "Id": "c84026b7-89fb-42be-968d-479ddf253d05", + "Name": "S2A_MSIL2A_20200106T100401_N0500_R122_T33UWP_20230422T061153.SAFE", + "ContentType": "application/octet-stream", + "ContentLength": 1196303395, + "OriginDate": "2023-10-21T15:13:27.236000Z", + "PublicationDate": "2023-10-22T04:59:54.285672Z", + "ModificationDate": "2024-05-09T21:39:12.847556Z", + "Online": true, + "EvictionDate": "9999-12-31T23:59:59.999999Z", + "S3Path": "/eodata/Sentinel-2/MSI/L2A_N0500/2020/01/06/S2A_MSIL2A_20200106T100401_N0500_R122_T33UWP_20230422T061153.SAFE", + "Checksum": [ + { + "Value": "ee10a2bb200e6a17161c53aaaadccf6d", + "Algorithm": "MD5", + "ChecksumDate": "2023-10-22T05:00:05.368001Z" + }, + { + "Value": "88b3897f05e34aa24710d552417bb0d6c7174d1d9101d2352a7f406d3f53c11b", + "Algorithm": "BLAKE3", + "ChecksumDate": "2023-10-22T05:00:07.876332Z" + } + ], + "ContentDate": { + "Start": "2020-01-06T10:04:01.024000Z", + "End": "2020-01-06T10:04:01.024000Z" + }, + "Footprint": "geography'SRID=4326;POLYGON ((14.9997279041062 48.7530130044756, 14.9997330963449 47.7651665667219, 16.4647868669399 47.7558186458081, 16.4932694755772 48.7433372246506, 14.9997279041062 48.7530130044756))'", + "GeoFootprint": { + "type": "Polygon", + "coordinates": [ + [ + [ + 14.9997279041062, + 48.7530130044756 + ], + [ + 14.9997330963449, + 47.7651665667219 + ], + [ + 16.4647868669399, + 47.7558186458081 + ], + [ + 16.4932694755772, + 48.7433372246506 + ], + [ + 14.9997279041062, + 48.7530130044756 + ] + ] + ] + } + } + ] +} diff --git a/tests/test_odata.py b/tests/test_odata.py new file mode 100644 index 0000000..09a4808 --- /dev/null +++ b/tests/test_odata.py @@ -0,0 +1,48 @@ +from datetime import datetime + +from eodm.extract import extract_odata_products +from eodm.odata import ODataCollection, ODataProduct +from geojson_pydantic import Feature + + +def test_extract_odata_products(mock_odata_search): + url = "https://catalogue.dataspace.copernicus.eu/odata/v1/Products" + collections = [ODataCollection.SENTINEL_2] + datetime_range = (datetime(2020, 1, 1), datetime(2020, 1, 20)) + name_contains = "L2A" + name_not_contains = "_N9999" + intersect_feature = Feature( + **{ + "type": "Feature", + "properties": {}, + "geometry": { + "coordinates": [ + [ + [15.56245005769594, 47.7835662401493], + [17.0294655088245, 47.7835662401493], + [17.0294655088245, 48.435089489798344], + [15.56245005769594, 48.435089489798344], + [15.56245005769594, 47.7835662401493], + ] + ], + "type": "Polygon", + }, + } + ) + cloud_cover_less_than = 50 + + products = list( + extract_odata_products( + url=url, + collections=collections, + datetime=datetime_range, + intersect_geometry=intersect_feature.geometry, + name_contains=name_contains, + name_not_contains=name_not_contains, + cloud_cover_less_than=cloud_cover_less_than, + ) + ) + + assert len(products) == 18 + assert all(isinstance(product, ODataProduct) for product in products) + assert all(product.name for product in products)