From ae8454f1a46869b9c903afe48f84f8ba538ca9a3 Mon Sep 17 00:00:00 2001 From: Sylvain Brunato Date: Mon, 16 Mar 2026 17:40:42 +0100 Subject: [PATCH 01/13] feat: EOProduct from_dict and from_file --- eodag/api/product/_product.py | 59 ++++++++++++++++++++++++++++++++--- 1 file changed, 55 insertions(+), 4 deletions(-) diff --git a/eodag/api/product/_product.py b/eodag/api/product/_product.py index 33d49bcae5..aa4e2428d1 100644 --- a/eodag/api/product/_product.py +++ b/eodag/api/product/_product.py @@ -25,6 +25,7 @@ from datetime import datetime from typing import TYPE_CHECKING, Any, Iterable, Literal, Optional, Union, cast +import geojson import orjson import requests from requests import RequestException @@ -60,6 +61,8 @@ USER_AGENT, ProgressCallback, StreamResponse, + _deprecated, + deepcopy, format_string, get_geometry_from_various, ) @@ -70,6 +73,7 @@ from concurrent.futures import ThreadPoolExecutor from shapely.geometry.base import BaseGeometry + from eodag import EODataAccessGateway from eodag.api.product.drivers.base import DatasetDriver from eodag.plugins.apis.base import Api from eodag.plugins.authentication.base import Authentication @@ -286,32 +290,79 @@ def as_dict(self) -> dict[str, Any]: return geojson_repr @classmethod - def from_geojson(cls, feature: dict[str, Any]) -> EOProduct: + def from_dict( + cls, feature: dict[str, Any], dag: Optional[EODataAccessGateway] = None + ) -> EOProduct: """Builds an :class:`~eodag.api.product._product.EOProduct` object from its - representation as geojson + serialized representation as a Python dict. :param feature: The representation of a :class:`~eodag.api.product._product.EOProduct` as a Python dict + :param dag: (optional) The EODataAccessGateway instance to use for registering the product downloader. If not + provided, the downloader and authenticator will not be registered. :returns: An instance of :class:`~eodag.api.product._product.EOProduct` :raises: :class:`~eodag.utils.exceptions.ValidationError` """ try: collection = feature.get("collection") - properties = feature["properties"] + properties = deepcopy(feature["properties"]) properties["geometry"] = feature["geometry"] properties["id"] = feature["id"] provider = properties.pop("eodag:provider") search_intersection = properties.pop("eodag:search_intersection") except KeyError as e: raise ValidationError( - "Key %s not found in geojson, make sure it comes from a serialized SearchResult" + "Key %s not found in geojson, make sure it comes from a serialized SearchResult or EOProduct" % e.args[0] ) from e obj = cls(provider, properties, collection=collection) obj.search_intersection = geometry.shape(search_intersection) obj.assets = AssetsDict(obj, feature.get("assets", {})) + + if dag is not None: + # register + downloader = dag._plugins_manager.get_download_plugin(obj) + auth = obj.downloader_auth + if auth is None: + auth = dag._plugins_manager.get_auth_plugin(downloader, obj) + obj.register_downloader(downloader, auth) + return obj + @classmethod + def from_file( + cls, filepath: str, dag: Optional[EODataAccessGateway] = None + ) -> EOProduct: + """Builds an :class:`~eodag.api.product._product.EOProduct` object from its + serialized representation as a Python dict. + + :param filepath: The path to the file containing the serialized representation of a product + :param dag: (optional) The EODataAccessGateway instance to use for registering the product downloader. If not + provided, the downloader and authenticator will not be registered. + :returns: An instance of :class:`~eodag.api.product._product.EOProduct` + :raises: :class:`~eodag.utils.exceptions.ValidationError` + """ + with open(filepath, "r") as fh: + feature = geojson.load(fh) + + return cls.from_dict(feature, dag=dag) + + @classmethod + @_deprecated( + reason="Please use 'EOProduct.from_file' instead", + version="4.1.0", + ) + def from_geojson(cls, feature: dict[str, Any]) -> EOProduct: + """Builds an :class:`~eodag.api.product._product.EOProduct` object from its + representation as geojson + + :param feature: The representation of a :class:`~eodag.api.product._product.EOProduct` + as a Python dict + :returns: An instance of :class:`~eodag.api.product._product.EOProduct` + :raises: :class:`~eodag.utils.exceptions.ValidationError` + """ + return cls.from_dict(feature) + # Implementation of geo-interface protocol (See # https://gist.github.com/sgillies/2217756) __geo_interface__ = property(as_dict) From 3d50550245b6f9e41335904ebf5bf9c154987412 Mon Sep 17 00:00:00 2001 From: Sylvain Brunato Date: Mon, 16 Mar 2026 18:24:46 +0100 Subject: [PATCH 02/13] refactor: move stac item import to EOProduct --- eodag/api/core.py | 13 ++- eodag/api/product/__init__.py | 29 +----- eodag/api/product/_product.py | 31 ++++++ eodag/api/search_result.py | 159 +---------------------------- eodag/utils/deserialize.py | 187 ++++++++++++++++++++++++++++++++++ 5 files changed, 229 insertions(+), 190 deletions(-) create mode 100644 eodag/utils/deserialize.py diff --git a/eodag/api/core.py b/eodag/api/core.py index 67cbce504d..3ef960939e 100644 --- a/eodag/api/core.py +++ b/eodag/api/core.py @@ -38,6 +38,7 @@ from pydantic import AliasChoices from eodag.api.collection import Collection, CollectionsDict, CollectionsList +from eodag.api.product import EOProduct from eodag.api.product.metadata_mapping import mtd_cfg_as_conversion_and_querypath from eodag.api.provider import Provider, ProvidersDict from eodag.api.search_result import SearchResult @@ -91,7 +92,6 @@ from concurrent.futures import ThreadPoolExecutor from shapely.geometry.base import BaseGeometry - from eodag.api.product import EOProduct from eodag.plugins.apis.base import Api from eodag.plugins.crunch.base import Crunch from eodag.plugins.search.base import Search @@ -2381,7 +2381,9 @@ def _attach_collection_config(self, plugin: Search, collection: str) -> None: collection=collection, ) - def import_stac_items(self, items_urls: list[str]) -> SearchResult: + def import_stac_items( + self, items_urls: list[str], provider: Optional[str] = None + ) -> SearchResult: """Import STAC items from a list of URLs and convert them to SearchResult. - Origin provider and download links will be set if item comes from an EODAG @@ -2391,6 +2393,7 @@ def import_stac_items(self, items_urls: list[str]) -> SearchResult: - If item comes from an unknown provider, a generic STAC provider will be used. :param items_urls: A list of STAC items URLs to import + :param provider: (optional) The EODAG provider to which the STAC items belong, if known. :returns: A SearchResult containing the imported STAC items """ json_items = [] @@ -2402,9 +2405,9 @@ def import_stac_items(self, items_urls: list[str]) -> SearchResult: results = SearchResult([]) for json_item in json_items: - if search_result := SearchResult._from_stac_item( - json_item, self._plugins_manager + if product := EOProduct._from_stac_item( + json_item, self._plugins_manager, provider ): - results.extend(search_result) + results.append(product) return results diff --git a/eodag/api/product/__init__.py b/eodag/api/product/__init__.py index a682bdc500..d870d50f37 100644 --- a/eodag/api/product/__init__.py +++ b/eodag/api/product/__init__.py @@ -18,10 +18,7 @@ # """EODAG product package""" -from typing import TYPE_CHECKING, Any, Optional - -if TYPE_CHECKING: - from eodag.plugins.manager import PluginManager +from eodag.utils.deserialize import unregistered_product_from_item try: # import from eodag-cube if installed @@ -35,29 +32,5 @@ from ._product import EOProduct # type: ignore[assignment] -def unregistered_product_from_item( - feature: dict[str, Any], provider: str, plugins_manager: "PluginManager" -) -> Optional[EOProduct]: - """Create an EOProduct from a STAC item, map its metadata, but without registering its plugins. - - :param feature: The STAC item to convert into an EOProduct. - :param provider: The associated provider from which configuration should be used for mapping. - :param plugins_manager: The plugins manager instance to use for retrieving search plugins. - :returns: An EOProduct instance if the item can be normalized, otherwise None. - """ - for search_plugin in plugins_manager.get_search_plugins(provider=provider): - if hasattr(search_plugin, "normalize_results"): - products = search_plugin.normalize_results([feature]) - if len(products) > 0: - # properties cleanup - for prop in ("start_datetime", "end_datetime"): - products[0].properties.pop(prop, None) - # set collection if not already set - if products[0].collection is None: - products[0].collection = products[0].properties.get("collection") - return products[0] - return None - - # exportable content __all__ = ["Asset", "AssetsDict", "EOProduct", "unregistered_product_from_item"] diff --git a/eodag/api/product/_product.py b/eodag/api/product/_product.py index aa4e2428d1..05a62b0ac4 100644 --- a/eodag/api/product/_product.py +++ b/eodag/api/product/_product.py @@ -66,6 +66,11 @@ format_string, get_geometry_from_various, ) +from eodag.utils.deserialize import ( + _import_stac_item_from_eodag_server, + _import_stac_item_from_known_provider, + _import_stac_item_from_unknown_provider, +) from eodag.utils.exceptions import DownloadError, MisconfiguredError, ValidationError from eodag.utils.repr import dict_to_html_table @@ -860,3 +865,29 @@ def augment_from_xarray( :returns: updated EOProduct """ raise NotImplementedError("Install eodag-cube to make this method available.") + + @classmethod + def _from_stac_item( + cls, + feature: dict[str, Any], + plugins_manager: PluginManager, + provider: Optional[str] = None, + ) -> Optional[EOProduct]: + """Create a SearchResult from a STAC item. + + :param feature: A STAC item as a dictionary + :param plugins_manager: The EODAG plugin manager instance + :provider: (optional) The provider to which the STAC item belongs, if known. If not provided, the method will + try to determine it from the STAC item properties. + :returns: An EOProduct created from the STAC item + """ + # Try importing from EODAG Server + if result := _import_stac_item_from_eodag_server(feature, plugins_manager): + return result + + # try importing from a known STAC provider + if result := _import_stac_item_from_known_provider(feature, plugins_manager): + return result + + # try importing from an unknown STAC provider + return _import_stac_item_from_unknown_provider(feature, plugins_manager) diff --git a/eodag/api/search_result.py b/eodag/api/search_result.py index 9737d7e563..22d610508e 100644 --- a/eodag/api/search_result.py +++ b/eodag/api/search_result.py @@ -26,21 +26,19 @@ from shapely.geometry import shape from typing_extensions import Doc -from eodag.api.product import EOProduct, unregistered_product_from_item +from eodag.api.product import EOProduct from eodag.plugins.crunch.filter_date import FilterDate from eodag.plugins.crunch.filter_latest_intersect import FilterLatestIntersect from eodag.plugins.crunch.filter_latest_tpl_name import FilterLatestByName from eodag.plugins.crunch.filter_overlap import FilterOverlap from eodag.plugins.crunch.filter_property import FilterProperty -from eodag.utils import GENERIC_STAC_PROVIDER, STAC_SEARCH_PLUGINS, STAC_VERSION -from eodag.utils.exceptions import MisconfiguredError +from eodag.utils import STAC_VERSION if TYPE_CHECKING: from shapely.geometry.base import BaseGeometry from eodag.api.core import EODataAccessGateway from eodag.plugins.crunch.base import Crunch - from eodag.plugins.manager import PluginManager logger = logging.getLogger("eodag.search_result") @@ -378,159 +376,6 @@ def get_next_page(current): break return - @classmethod - def _from_stac_item( - cls, feature: dict[str, Any], plugins_manager: PluginManager - ) -> SearchResult: - """Create a SearchResult from a STAC item. - - :param feature: A STAC item as a dictionary - :param plugins_manager: The EODAG plugin manager instance - :returns: A SearchResult containing the EOProduct(s) created from the STAC item - """ - # Try importing from EODAG Server - if results := _import_stac_item_from_eodag_server(feature, plugins_manager): - return results - - # try importing from a known STAC provider - if results := _import_stac_item_from_known_provider(feature, plugins_manager): - return results - - # try importing from an unknown STAC provider - return _import_stac_item_from_unknown_provider(feature, plugins_manager) - - -def _import_stac_item_from_eodag_server( - feature: dict[str, Any], plugins_manager: PluginManager -) -> Optional[SearchResult]: - """Import a STAC item from EODAG Server. - - :param feature: A STAC item as a dictionary - :param plugins_manager: The EODAG plugin manager instance - :returns: A SearchResult containing the EOProduct(s) created from the STAC item - """ - provider = None - if backends := feature["properties"].get("federation:backends"): - provider = backends[0] - elif providers := feature["properties"].get("providers"): - provider = providers[0].get("name") - if provider is not None: - logger.debug("Trying to import STAC item from EODAG Server") - # assets coming from a STAC provider - assets = { - k: v["alternate"]["origin"] - for k, v in feature.get("assets", {}).items() - if k not in ("thumbnail", "downloadLink", "eodag:download_link") - and "origin" in v.get("alternate", {}) - } - if assets: - updated_item = {**feature, **{"assets": assets}} - else: - # item coming from a non-STAC provider - updated_item = {**feature} - download_link = ( - feature.get("assets", {}) - .get("downloadLink", {}) - .get("alternate", {}) - .get("origin", {}) - .get("href") - ) or ( - feature.get("assets", {}) - .get("eodag:download_link", {}) - .get("alternate", {}) - .get("origin", {}) - .get("href") - ) - if download_link: - updated_item["assets"] = {} - updated_item["links"] = [{"rel": "self", "href": download_link}] - else: - updated_item = {} - try: - eo_product = unregistered_product_from_item( - updated_item, GENERIC_STAC_PROVIDER, plugins_manager - ) - except MisconfiguredError: - eo_product = None - if eo_product is not None: - eo_product.provider = provider - eo_product._register_downloader_from_manager(plugins_manager) - return SearchResult([eo_product]) - return None - - -def _import_stac_item_from_known_provider( - feature: dict[str, Any], plugins_manager: PluginManager -) -> Optional[SearchResult]: - """Import a STAC item from an already-configured STAC provider. - - :param feature: A STAC item as a dictionary - :param plugins_manager: The EODAG plugin manager instance - :returns: A SearchResult containing the EOProduct(s) created from the STAC item - """ - item_hrefs = [f for f in feature.get("links", []) if f.get("rel") == "self"] - item_href = item_hrefs[0]["href"] if len(item_hrefs) > 0 else None - imported_products = SearchResult([]) - for search_plugin in plugins_manager.get_search_plugins(): - # only try STAC search plugins - if ( - search_plugin.config.type in STAC_SEARCH_PLUGINS - and search_plugin.provider != GENERIC_STAC_PROVIDER - and hasattr(search_plugin, "normalize_results") - ): - provider_base_url = search_plugin.config.api_endpoint.removesuffix( - "/search" - ) - # compare the item href with the provider base URL - if item_href and item_href.startswith(provider_base_url): - products = search_plugin.normalize_results([feature]) - if len(products) == 0 or len(products[0].assets) == 0: - continue - logger.debug( - "Trying to import STAC item from %s", search_plugin.provider - ) - eo_product = products[0] - - configured_cols = [ - k - for k, v in search_plugin.config.products.items() - if v.get("_collection") == feature.get("collection") - ] - if len(configured_cols) > 0: - eo_product.collection = configured_cols[0] - else: - eo_product.collection = feature.get("collection") - - eo_product._register_downloader_from_manager(plugins_manager) - imported_products.append(eo_product) - if len(imported_products) > 0: - return imported_products - return None - - -def _import_stac_item_from_unknown_provider( - feature: dict[str, Any], plugins_manager: PluginManager -) -> SearchResult: - """Import a STAC item from an unknown STAC provider. - - :param feature: A STAC item as a dictionary - :param plugins_manager: The EODAG plugin manager instance - :returns: A SearchResult containing the EOProduct(s) created from the STAC item - """ - try: - logger.debug("Trying to import STAC item from unknown provider") - eo_product = unregistered_product_from_item( - feature, GENERIC_STAC_PROVIDER, plugins_manager - ) - except MisconfiguredError: - pass - if eo_product is not None: - eo_product.collection = feature.get("collection") - eo_product._register_downloader_from_manager(plugins_manager) - return SearchResult([eo_product]) - else: - return SearchResult([]) - class RawSearchResult(UserList[dict[str, Any]]): """An object representing a collection of raw/unparsed search results obtained from a provider. diff --git a/eodag/utils/deserialize.py b/eodag/utils/deserialize.py new file mode 100644 index 0000000000..00419d8d6b --- /dev/null +++ b/eodag/utils/deserialize.py @@ -0,0 +1,187 @@ +# -*- coding: utf-8 -*- +# Copyright 2026, CS GROUP - France, https://www.csgroup.eu/ +# +# This file is part of EODAG project +# https://www.github.com/CS-SI/EODAG +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +from __future__ import annotations + +import logging +from typing import TYPE_CHECKING, Any, Optional + +from eodag.utils import GENERIC_STAC_PROVIDER, STAC_SEARCH_PLUGINS +from eodag.utils.exceptions import MisconfiguredError + +if TYPE_CHECKING: + from eodag.api.product import EOProduct + from eodag.plugins.manager import PluginManager + + +logger = logging.getLogger("eodag.utils.deserialize") + + +def unregistered_product_from_item( + feature: dict[str, Any], provider: str, plugins_manager: "PluginManager" +) -> Optional[EOProduct]: + """Create an EOProduct from a STAC item, map its metadata, but without registering its plugins. + + :param feature: The STAC item to convert into an EOProduct. + :param provider: The associated provider from which configuration should be used for mapping. + :param plugins_manager: The plugins manager instance to use for retrieving search plugins. + :returns: An EOProduct instance if the item can be normalized, otherwise None. + """ + for search_plugin in plugins_manager.get_search_plugins(provider=provider): + if hasattr(search_plugin, "normalize_results"): + products = search_plugin.normalize_results([feature]) + if len(products) > 0: + # properties cleanup + for prop in ("start_datetime", "end_datetime"): + products[0].properties.pop(prop, None) + # set collection if not already set + if products[0].collection is None: + products[0].collection = products[0].properties.get("collection") + return products[0] + return None + + +def _import_stac_item_from_eodag_server( + feature: dict[str, Any], plugins_manager: PluginManager +) -> Optional[EOProduct]: + """Import a STAC item from EODAG Server. + + :param feature: A STAC item as a dictionary + :param plugins_manager: The EODAG plugin manager instance + :returns: An EOProduct created from the STAC item + """ + provider = None + if backends := feature["properties"].get("federation:backends"): + provider = backends[0] + elif providers := feature["properties"].get("providers"): + provider = providers[0].get("name") + if provider is not None: + logger.debug("Trying to import STAC item from EODAG Server") + # assets coming from a STAC provider + assets = { + k: v["alternate"]["origin"] + for k, v in feature.get("assets", {}).items() + if k not in ("thumbnail", "downloadLink", "eodag:download_link") + and "origin" in v.get("alternate", {}) + } + if assets: + updated_item = {**feature, **{"assets": assets}} + else: + # item coming from a non-STAC provider + updated_item = {**feature} + download_link = ( + feature.get("assets", {}) + .get("downloadLink", {}) + .get("alternate", {}) + .get("origin", {}) + .get("href") + ) or ( + feature.get("assets", {}) + .get("eodag:download_link", {}) + .get("alternate", {}) + .get("origin", {}) + .get("href") + ) + if download_link: + updated_item["assets"] = {} + updated_item["links"] = [{"rel": "self", "href": download_link}] + else: + updated_item = {} + try: + eo_product = unregistered_product_from_item( + updated_item, GENERIC_STAC_PROVIDER, plugins_manager + ) + except MisconfiguredError: + eo_product = None + if eo_product is not None: + eo_product.provider = provider + eo_product._register_downloader_from_manager(plugins_manager) + return eo_product + return None + + +def _import_stac_item_from_known_provider( + feature: dict[str, Any], + plugins_manager: PluginManager, + provider: Optional[str] = None, +) -> Optional[EOProduct]: + """Import a STAC item from an already-configured STAC provider. + + :param feature: A STAC item as a dictionary + :param plugins_manager: The EODAG plugin manager instance + :returns: An EOProduct created from the STAC item + """ + item_hrefs = [f for f in feature.get("links", []) if f.get("rel") == "self"] + item_href = item_hrefs[0]["href"] if len(item_hrefs) > 0 else None + for search_plugin in plugins_manager.get_search_plugins(provider=provider): + # only try STAC search plugins + if ( + search_plugin.config.type in STAC_SEARCH_PLUGINS + and search_plugin.provider != GENERIC_STAC_PROVIDER + and hasattr(search_plugin, "normalize_results") + ): + provider_base_url = search_plugin.config.api_endpoint.removesuffix( + "/search" + ) + # compare the item href with the provider base URL + if item_href and item_href.startswith(provider_base_url): + products = search_plugin.normalize_results([feature]) + if len(products) == 0 or len(products[0].assets) == 0: + continue + logger.debug( + "Trying to import STAC item from %s", search_plugin.provider + ) + eo_product = products[0] + + configured_cols = [ + k + for k, v in search_plugin.config.products.items() + if v.get("_collection") == feature.get("collection") + ] + if len(configured_cols) > 0: + eo_product.collection = configured_cols[0] + else: + eo_product.collection = feature.get("collection") + + eo_product._register_downloader_from_manager(plugins_manager) + return eo_product + + return None + + +def _import_stac_item_from_unknown_provider( + feature: dict[str, Any], plugins_manager: PluginManager +) -> Optional[EOProduct]: + """Import a STAC item from an unknown STAC provider. + + :param feature: A STAC item as a dictionary + :param plugins_manager: The EODAG plugin manager instance + :returns: An EOProduct created from the STAC item + """ + try: + logger.debug("Trying to import STAC item from unknown provider") + eo_product = unregistered_product_from_item( + feature, GENERIC_STAC_PROVIDER, plugins_manager + ) + except MisconfiguredError: + pass + if eo_product is not None: + eo_product.collection = feature.get("collection") + eo_product._register_downloader_from_manager(plugins_manager) + return eo_product + else: + return None From 1794e5320ba550c28a68a84651535fd2ea2442b1 Mon Sep 17 00:00:00 2001 From: Sylvain Brunato Date: Tue, 17 Mar 2026 09:57:39 +0100 Subject: [PATCH 03/13] product from_dict --- eodag/api/product/_product.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/eodag/api/product/_product.py b/eodag/api/product/_product.py index 05a62b0ac4..f2b528fde7 100644 --- a/eodag/api/product/_product.py +++ b/eodag/api/product/_product.py @@ -338,8 +338,8 @@ def from_dict( def from_file( cls, filepath: str, dag: Optional[EODataAccessGateway] = None ) -> EOProduct: - """Builds an :class:`~eodag.api.product._product.EOProduct` object from its - serialized representation as a Python dict. + """Builds an :class:`~eodag.api.product._product.EOProduct` object from a file containing its serialized + representation as geojson. :param filepath: The path to the file containing the serialized representation of a product :param dag: (optional) The EODataAccessGateway instance to use for registering the product downloader. If not @@ -354,7 +354,7 @@ def from_file( @classmethod @_deprecated( - reason="Please use 'EOProduct.from_file' instead", + reason="Please use 'EOProduct.from_dict' instead", version="4.1.0", ) def from_geojson(cls, feature: dict[str, Any]) -> EOProduct: From b8bdce86a6dcd4b23eb029177ad039a4e1f863eb Mon Sep 17 00:00:00 2001 From: Sylvain Brunato Date: Tue, 17 Mar 2026 10:23:08 +0100 Subject: [PATCH 04/13] refactor: SearchResult from_dict and as_dict --- eodag/api/core.py | 4 +- eodag/api/search_result.py | 40 +++++++++++++++---- tests/integration/test_core_search_results.py | 10 ++--- tests/test_end_to_end.py | 2 +- tests/units/test_core.py | 2 +- tests/units/test_eoproduct.py | 2 +- tests/units/test_search_result.py | 6 +-- 7 files changed, 46 insertions(+), 20 deletions(-) diff --git a/eodag/api/core.py b/eodag/api/core.py index 3ef960939e..3adbeb663f 100644 --- a/eodag/api/core.py +++ b/eodag/api/core.py @@ -2056,7 +2056,7 @@ def serialize( :param filename: (optional) The name of the file to generate :returns: The name of the created file """ - search_result_dict = search_result.as_geojson_object() + search_result_dict = search_result.as_dict() # add self link search_result_dict.setdefault("links", []) search_result_dict["links"].append( @@ -2102,7 +2102,7 @@ def deserialize(filename: str) -> SearchResult: :returns: The search results encoded in `filename` """ with open(filename, "r") as fh: - return SearchResult.from_geojson(geojson.load(fh)) + return SearchResult.from_dict(geojson.load(fh)) def deserialize_and_register(self, filename: str) -> SearchResult: """Loads results of a search from a geojson file and register diff --git a/eodag/api/search_result.py b/eodag/api/search_result.py index 22d610508e..e001379663 100644 --- a/eodag/api/search_result.py +++ b/eodag/api/search_result.py @@ -32,7 +32,7 @@ from eodag.plugins.crunch.filter_latest_tpl_name import FilterLatestByName from eodag.plugins.crunch.filter_overlap import FilterOverlap from eodag.plugins.crunch.filter_property import FilterProperty -from eodag.utils import STAC_VERSION +from eodag.utils import STAC_VERSION, _deprecated if TYPE_CHECKING: from shapely.geometry.base import BaseGeometry @@ -182,16 +182,21 @@ def filter_online(self) -> SearchResult: """ return self.filter_property(**{"order:status": "succeeded"}) - @staticmethod - def from_geojson(feature_collection: dict[str, Any]) -> SearchResult: + @classmethod + def from_dict( + cls, + feature_collection: dict[str, Any], + dag: Optional[EODataAccessGateway] = None, + ) -> SearchResult: """Builds an :class:`~eodag.api.search_result.SearchResult` object from its representation as geojson :param feature_collection: A collection representing a search result. + :param dag: (optional) The EODataAccessGateway instance to use for registering the products. :returns: An eodag representation of a search result """ products = [ - EOProduct.from_geojson(feature) + EOProduct.from_dict(feature, dag=dag) for feature in feature_collection.get("features", []) ] props = feature_collection.get("metadata", {}) or {} @@ -200,7 +205,7 @@ def from_geojson(feature_collection: dict[str, Any]) -> SearchResult: if eodag_search_params and eodag_search_params.get("geometry"): eodag_search_params["geometry"] = shape(eodag_search_params["geometry"]) - return SearchResult( + return cls( products=products, number_matched=props.get("eodag:number_matched"), next_page_token=props.get("eodag:next_page_token"), @@ -209,7 +214,20 @@ def from_geojson(feature_collection: dict[str, Any]) -> SearchResult: raise_errors=props.get("eodag:raise_errors"), ) - def as_geojson_object(self) -> dict[str, Any]: + @staticmethod + @_deprecated( + reason="Please use 'SearchResult.from_dict' instead", + version="4.1.0", + ) + def from_geojson(feature_collection: dict[str, Any]) -> SearchResult: + """Builds an :class:`~eodag.api.search_result.SearchResult` object from its representation as geojson + + :param feature_collection: A collection representing a search result. + :returns: An eodag representation of a search result + """ + return SearchResult.from_dict(feature_collection) + + def as_dict(self) -> dict[str, Any]: """GeoJSON representation of SearchResult""" geojson_search_params = {} | (self.search_params or {}) @@ -234,12 +252,20 @@ def as_geojson_object(self) -> dict[str, Any]: "stac_version": STAC_VERSION, } + @_deprecated( + reason="Please use 'SearchResult.as_dict' instead", + version="4.1.0", + ) + def as_geojson_object(self) -> dict[str, Any]: + """GeoJSON representation of SearchResult""" + return self.as_dict() + def as_shapely_geometry_object(self) -> GeometryCollection: """:class:`shapely.GeometryCollection` representation of SearchResult""" return GeometryCollection( [ shape(feature["geometry"]).buffer(0) - for feature in self.as_geojson_object()["features"] + for feature in self.as_dict()["features"] ] ) diff --git a/tests/integration/test_core_search_results.py b/tests/integration/test_core_search_results.py index e1b25b95ec..a55dea9682 100644 --- a/tests/integration/test_core_search_results.py +++ b/tests/integration/test_core_search_results.py @@ -119,7 +119,7 @@ def setUp(self): ], "type": "FeatureCollection", } - self.search_result = SearchResult.from_geojson(self.geojson_repr) + self.search_result = SearchResult.from_dict(self.geojson_repr) self.search_result._dag = self.dag # Ensure that each product in a search result has geometry and search # intersection as a shapely geometry @@ -403,13 +403,13 @@ def test_group_by_extent(self): geom_coords_2 = [[[90, 3], [91, 3], [91, 4], [90, 4], [90, 3]]] geom_coords_3 = [[[92, 4], [92, 4], [92, 5], [91, 5], [91, 4]]] - eo_geom1 = EOProduct.from_geojson( + eo_geom1 = EOProduct.from_dict( self._minimal_eoproduct_geojson_repr("1", geom_coords_1) ) - eo_geom2 = EOProduct.from_geojson( + eo_geom2 = EOProduct.from_dict( self._minimal_eoproduct_geojson_repr("2", geom_coords_2) ) - eo_geom3 = EOProduct.from_geojson( + eo_geom3 = EOProduct.from_dict( self._minimal_eoproduct_geojson_repr("3", geom_coords_3) ) first_search = SearchResult([eo_geom1]) @@ -503,7 +503,7 @@ def test_core_search_results_registered(self, mock_query): ) with open(search_results_file, encoding="utf-8") as f: search_results_geojson = json.load(f) - products = SearchResult.from_geojson(search_results_geojson) + products = SearchResult.from_dict(search_results_geojson) mock_query.return_value = (products.data, len(products)) diff --git a/tests/test_end_to_end.py b/tests/test_end_to_end.py index 361cd1afbe..612afe63b8 100644 --- a/tests/test_end_to_end.py +++ b/tests/test_end_to_end.py @@ -270,7 +270,7 @@ def execute_search( self.assertEqual(one_product.provider, provider) # validate STAC serialization - self.stac.validate_item_collection_dict(results.as_geojson_object()) + self.stac.validate_item_collection_dict(results.as_dict()) for msg in self.stac.message: self.assertTrue( msg["valid_stac"], diff --git a/tests/units/test_core.py b/tests/units/test_core.py index 65c2f1ed1f..e5bef0574e 100644 --- a/tests/units/test_core.py +++ b/tests/units/test_core.py @@ -2524,7 +2524,7 @@ def setUpClass(cls): ) with open(search_results_file, encoding="utf-8") as f: search_results_geojson = json.load(f) - cls.search_results = SearchResult.from_geojson(search_results_geojson) + cls.search_results = SearchResult.from_dict(search_results_geojson) cls.search_results_size = len(cls.search_results) # Change the id of these products, to emulate different products search_results_data_2 = copy.deepcopy(cls.search_results.data) diff --git a/tests/units/test_eoproduct.py b/tests/units/test_eoproduct.py index 6d4ab46a1d..3a9f8aa106 100644 --- a/tests/units/test_eoproduct.py +++ b/tests/units/test_eoproduct.py @@ -142,7 +142,7 @@ def test_eoproduct_geointerface(self): def test_eoproduct_from_geointerface(self): """EOProduct must be build-able from its geo-interface""" product = self._dummy_product() - same_product = EOProduct.from_geojson(geojson.loads(geojson.dumps(product))) + same_product = EOProduct.from_dict(geojson.loads(geojson.dumps(product))) self.assertSequenceEqual( [ product.provider, diff --git a/tests/units/test_search_result.py b/tests/units/test_search_result.py index 97b7b5a1f1..8cc44a3e70 100644 --- a/tests/units/test_search_result.py +++ b/tests/units/test_search_result.py @@ -58,8 +58,8 @@ def test_search_result_geo_interface(self): self.assertEqual(geo_interface["type"], "FeatureCollection") self.assertEqual(geo_interface["features"], []) - def test_search_result_as_geojson_object(self): - geojson_object = self.search_result.as_geojson_object() + def test_search_result_as_dict(self): + geojson_object = self.search_result.as_dict() self.assertIsInstance(geojson_object, dict) self.assertTrue("type" in geojson_object) self.assertTrue("features" in geojson_object) @@ -79,7 +79,7 @@ def test_search_result_is_list_like(self): def test_search_result_from_feature_collection(self): """SearchResult instances must be build-able from feature collection geojson""" - same_search_result = SearchResult.from_geojson( + same_search_result = SearchResult.from_dict( geojson.loads(geojson.dumps(self.search_result)) ) self.assertEqual(len(same_search_result), len(self.search_result)) From b0b34b6d3a24b8d3b6edb55f2de23f0631b93b62 Mon Sep 17 00:00:00 2001 From: Sylvain Brunato Date: Tue, 17 Mar 2026 10:41:25 +0100 Subject: [PATCH 05/13] feat: SearchResult from_file --- eodag/api/core.py | 15 ++------------- eodag/api/search_result.py | 18 ++++++++++++++++++ 2 files changed, 20 insertions(+), 13 deletions(-) diff --git a/eodag/api/core.py b/eodag/api/core.py index 3adbeb663f..6141b69755 100644 --- a/eodag/api/core.py +++ b/eodag/api/core.py @@ -2101,8 +2101,7 @@ def deserialize(filename: str) -> SearchResult: :param filename: A filename containing a search result encoded as a geojson :returns: The search results encoded in `filename` """ - with open(filename, "r") as fh: - return SearchResult.from_dict(geojson.load(fh)) + return SearchResult.from_file(filename) def deserialize_and_register(self, filename: str) -> SearchResult: """Loads results of a search from a geojson file and register @@ -2114,17 +2113,7 @@ def deserialize_and_register(self, filename: str) -> SearchResult: :param filename: A filename containing a search result encoded as a geojson :returns: The search results encoded in `filename`, ready for download and pagination """ - products = self.deserialize(filename) - products._dag = self - for i, product in enumerate(products): - if product.downloader is None: - downloader = self._plugins_manager.get_download_plugin(product) - auth = product.downloader_auth - if auth is None: - auth = self._plugins_manager.get_auth_plugin(downloader, product) - products[i].register_downloader(downloader, auth) - - return products + return SearchResult.from_file(filename, self) def download( self, diff --git a/eodag/api/search_result.py b/eodag/api/search_result.py index e001379663..8182a68c66 100644 --- a/eodag/api/search_result.py +++ b/eodag/api/search_result.py @@ -21,6 +21,7 @@ from collections import UserList from typing import TYPE_CHECKING, Annotated, Any, Iterable, Iterator, Optional, Union +import geojson from shapely.geometry import GeometryCollection from shapely.geometry import mapping as shapely_mapping from shapely.geometry import shape @@ -214,6 +215,23 @@ def from_dict( raise_errors=props.get("eodag:raise_errors"), ) + @classmethod + def from_file( + cls, + filepath: str, + dag: Optional[EODataAccessGateway] = None, + ) -> SearchResult: + """Builds an :class:`~eodag.api.search_result.SearchResult` object from a geojson file + + :param filepath: Path to the file containing the feature collection. + :param dag: (optional) The EODataAccessGateway instance to use for registering the products. + :returns: An eodag representation of a search result + """ + with open(filepath, "r") as fh: + feature = geojson.load(fh) + + return cls.from_dict(feature, dag=dag) + @staticmethod @_deprecated( reason="Please use 'SearchResult.from_dict' instead", From b778c5288106769f8e9681960878ddb69271e74a Mon Sep 17 00:00:00 2001 From: Sylvain Brunato Date: Tue, 17 Mar 2026 17:41:46 +0100 Subject: [PATCH 06/13] refactor: eoproduct serialized methods --- eodag/api/product/_product.py | 111 +++++++++++++++++++++++++--------- eodag/utils/deserialize.py | 1 + 2 files changed, 83 insertions(+), 29 deletions(-) diff --git a/eodag/api/product/_product.py b/eodag/api/product/_product.py index f2b528fde7..98ef827eb3 100644 --- a/eodag/api/product/_product.py +++ b/eodag/api/product/_product.py @@ -296,7 +296,10 @@ def as_dict(self) -> dict[str, Any]: @classmethod def from_dict( - cls, feature: dict[str, Any], dag: Optional[EODataAccessGateway] = None + cls, + feature: dict[str, Any], + dag: Optional[EODataAccessGateway] = None, + raise_errors: bool = False, ) -> EOProduct: """Builds an :class:`~eodag.api.product._product.EOProduct` object from its serialized representation as a Python dict. @@ -305,38 +308,31 @@ def from_dict( as a Python dict :param dag: (optional) The EODataAccessGateway instance to use for registering the product downloader. If not provided, the downloader and authenticator will not be registered. + :param raise_errors: (optional) Whether to raise exceptions in case of errors during the deserialize process. + If False, and if ``dag`` is given, several import methods will be tried: from serialized, + from eodag-server, from known provider, from unknown provider. :returns: An instance of :class:`~eodag.api.product._product.EOProduct` :raises: :class:`~eodag.utils.exceptions.ValidationError` """ - try: - collection = feature.get("collection") - properties = deepcopy(feature["properties"]) - properties["geometry"] = feature["geometry"] - properties["id"] = feature["id"] - provider = properties.pop("eodag:provider") - search_intersection = properties.pop("eodag:search_intersection") - except KeyError as e: - raise ValidationError( - "Key %s not found in geojson, make sure it comes from a serialized SearchResult or EOProduct" - % e.args[0] - ) from e - obj = cls(provider, properties, collection=collection) - obj.search_intersection = geometry.shape(search_intersection) - obj.assets = AssetsDict(obj, feature.get("assets", {})) - if dag is not None: - # register - downloader = dag._plugins_manager.get_download_plugin(obj) - auth = obj.downloader_auth - if auth is None: - auth = dag._plugins_manager.get_auth_plugin(downloader, obj) - obj.register_downloader(downloader, auth) - - return obj + plugin_manager = dag._plugins_manager + product = cls._from_stac_item( + feature, plugin_manager, provider=None, raise_errors=raise_errors + ) + if product is None: + raise ValidationError( + "Unable to build EOProduct from the provided dictionary, no import method succeeded" + ) + else: + product = cls._import_stac_item_from_serialized(feature) + return product @classmethod def from_file( - cls, filepath: str, dag: Optional[EODataAccessGateway] = None + cls, + filepath: str, + dag: Optional[EODataAccessGateway] = None, + raise_errors: bool = False, ) -> EOProduct: """Builds an :class:`~eodag.api.product._product.EOProduct` object from a file containing its serialized representation as geojson. @@ -344,13 +340,16 @@ def from_file( :param filepath: The path to the file containing the serialized representation of a product :param dag: (optional) The EODataAccessGateway instance to use for registering the product downloader. If not provided, the downloader and authenticator will not be registered. + :param raise_errors: (optional) Whether to raise exceptions in case of errors during the deserialize process. + If False, several import methods will be tried: from serialized, from eodag-server, from + known provider, from unknown provider. :returns: An instance of :class:`~eodag.api.product._product.EOProduct` :raises: :class:`~eodag.utils.exceptions.ValidationError` """ with open(filepath, "r") as fh: feature = geojson.load(fh) - return cls.from_dict(feature, dag=dag) + return cls.from_dict(feature, dag=dag, raise_errors=raise_errors) @classmethod @_deprecated( @@ -366,7 +365,7 @@ def from_geojson(cls, feature: dict[str, Any]) -> EOProduct: :returns: An instance of :class:`~eodag.api.product._product.EOProduct` :raises: :class:`~eodag.utils.exceptions.ValidationError` """ - return cls.from_dict(feature) + return cls.from_dict(feature, raise_errors=True) # Implementation of geo-interface protocol (See # https://gist.github.com/sgillies/2217756) @@ -866,12 +865,50 @@ def augment_from_xarray( """ raise NotImplementedError("Install eodag-cube to make this method available.") + @classmethod + def _import_stac_item_from_serialized( + cls, feature: dict[str, Any], plugins_manager: Optional[PluginManager] = None + ) -> EOProduct: + """Import a STAC item from a EODAG serialized EOProduct. + + :param feature: A STAC item as a dictionary + :param plugins_manager: The EODAG plugin manager instance + :returns: An EOProduct created from the STAC item + :raises: :class:`~eodag.utils.exceptions.ValidationError` + """ + try: + collection = feature.get("collection") + properties = deepcopy(feature["properties"]) + properties["geometry"] = feature["geometry"] + properties["id"] = feature["id"] + provider = properties.pop("eodag:provider") + search_intersection = properties.pop("eodag:search_intersection") + except KeyError as e: + raise ValidationError( + "Key %s not found in geojson, make sure it comes from a serialized SearchResult or EOProduct" + % e.args[0] + ) from e + obj = cls(provider, properties, collection=collection) + obj.search_intersection = geometry.shape(search_intersection) + obj.assets.update(feature.get("assets", {})) + + if plugins_manager is not None: + # register + downloader = plugins_manager.get_download_plugin(obj) + auth = obj.downloader_auth + if auth is None: + auth = plugins_manager.get_auth_plugin(downloader, obj) + obj.register_downloader(downloader, auth) + + return obj + @classmethod def _from_stac_item( cls, feature: dict[str, Any], plugins_manager: PluginManager, provider: Optional[str] = None, + raise_errors: bool = False, ) -> Optional[EOProduct]: """Create a SearchResult from a STAC item. @@ -879,14 +916,30 @@ def _from_stac_item( :param plugins_manager: The EODAG plugin manager instance :provider: (optional) The provider to which the STAC item belongs, if known. If not provided, the method will try to determine it from the STAC item properties. + :param raise_errors: (optional) Whether to raise exceptions in case of errors during the deserialize process. + If False, several import methods will be tried: from serialized, from eodag-server, from + known provider, from unknown provider. :returns: An EOProduct created from the STAC item """ + result: Optional[EOProduct] = None + try: + # try importing from a serialized EODAG EOProduct + if result := cls._import_stac_item_from_serialized( + feature, plugins_manager + ): + return result + except ValidationError: + if raise_errors: + raise + # Try importing from EODAG Server if result := _import_stac_item_from_eodag_server(feature, plugins_manager): return result # try importing from a known STAC provider - if result := _import_stac_item_from_known_provider(feature, plugins_manager): + if result := _import_stac_item_from_known_provider( + feature, plugins_manager, provider + ): return result # try importing from an unknown STAC provider diff --git a/eodag/utils/deserialize.py b/eodag/utils/deserialize.py index 00419d8d6b..d98d2a461a 100644 --- a/eodag/utils/deserialize.py +++ b/eodag/utils/deserialize.py @@ -123,6 +123,7 @@ def _import_stac_item_from_known_provider( :param feature: A STAC item as a dictionary :param plugins_manager: The EODAG plugin manager instance + :param provider: The associated provider from which configuration should be used for mapping. :returns: An EOProduct created from the STAC item """ item_hrefs = [f for f in feature.get("links", []) if f.get("rel") == "self"] From e9f8ac0a4dfac52ea0cc391e058f702436ee3210 Mon Sep 17 00:00:00 2001 From: Sylvain Brunato Date: Tue, 31 Mar 2026 15:18:48 +0200 Subject: [PATCH 07/13] fix: add generic provider before guessing deserialize methods --- eodag/api/product/_product.py | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/eodag/api/product/_product.py b/eodag/api/product/_product.py index 98ef827eb3..b43e1ce109 100644 --- a/eodag/api/product/_product.py +++ b/eodag/api/product/_product.py @@ -57,6 +57,7 @@ DEFAULT_DOWNLOAD_WAIT, DEFAULT_SHAPELY_GEOMETRY, DEFAULT_STREAM_REQUESTS_TIMEOUT, + GENERIC_STAC_PROVIDER, STAC_VERSION, USER_AGENT, ProgressCallback, @@ -315,6 +316,9 @@ def from_dict( :raises: :class:`~eodag.utils.exceptions.ValidationError` """ if dag is not None: + # add a generic STAC provider that might be needed to handle the items + dag.add_provider(GENERIC_STAC_PROVIDER) + plugin_manager = dag._plugins_manager product = cls._from_stac_item( feature, plugin_manager, provider=None, raise_errors=raise_errors From 39c3ea7f5b32c04d8f84f47001c4a65f03d9ea03 Mon Sep 17 00:00:00 2001 From: Sylvain Brunato Date: Tue, 31 Mar 2026 15:21:42 +0200 Subject: [PATCH 08/13] feat: skip_invalid deserialize parameter --- eodag/api/core.py | 7 ++++-- eodag/api/product/_product.py | 43 +++++++++++++++++++-------------- eodag/api/search_result.py | 45 +++++++++++++++++++++++++---------- eodag/types/stac_metadata.py | 22 +++++++++++------ 4 files changed, 78 insertions(+), 39 deletions(-) diff --git a/eodag/api/core.py b/eodag/api/core.py index 6141b69755..1c02a37b97 100644 --- a/eodag/api/core.py +++ b/eodag/api/core.py @@ -2045,7 +2045,9 @@ def download_all( @staticmethod def serialize( - search_result: SearchResult, filename: str = "search_results.geojson" + search_result: SearchResult, + filename: str = "search_results.geojson", + skip_invalid: bool = True, ) -> str: """Registers results of a search into a geojson file. The output is a FeatureCollection containing the EO products as features, @@ -2054,9 +2056,10 @@ def serialize( :param search_result: A set of EO products resulting from a search :param filename: (optional) The name of the file to generate + :param skip_invalid: Whether to skip properties whose values are not valid according to the STAC specification. :returns: The name of the created file """ - search_result_dict = search_result.as_dict() + search_result_dict = search_result.as_dict(skip_invalid=skip_invalid) # add self link search_result_dict.setdefault("links", []) search_result_dict["links"].append( diff --git a/eodag/api/product/_product.py b/eodag/api/product/_product.py index b43e1ce109..e6f94e0eb3 100644 --- a/eodag/api/product/_product.py +++ b/eodag/api/product/_product.py @@ -218,10 +218,11 @@ def __init__( self.downloader: Optional[Union[Api, Download]] = None self.downloader_auth: Optional[Authentication] = None - def as_dict(self) -> dict[str, Any]: + def as_dict(self, skip_invalid: bool = True) -> dict[str, Any]: """Builds a representation of EOProduct as a dictionary to enable its geojson serialization + :param skip_invalid: Whether to skip properties whose values are not valid according to the STAC specification. :returns: The representation of a :class:`~eodag.api.product._product.EOProduct` as a Python dict """ @@ -247,33 +248,39 @@ def as_dict(self) -> dict[str, Any]: stac_properties["providers"] = stac_providers props_model = cast(type[CommonStacMetadata], create_stac_metadata_model()) - props_validated = props_model.safe_validate(stac_properties) + props_validated = props_model.safe_validate( + stac_properties, skip_invalid=skip_invalid + ) stac_extensions: set[str] = set(props_validated.get_conformance_classes()) # skip invalid properties - invalid_properties = { - k - for k in stac_properties.keys() - if k not in props_validated.model_dump() and props_model.has_field(k) - } - for key in invalid_properties: - stac_properties.pop(key, None) + if skip_invalid: + invalid_properties = { + k + for k in stac_properties.keys() + if k not in props_validated.model_dump() and props_model.has_field(k) + } + for key in invalid_properties: + stac_properties.pop(key, None) # get conformance classes for assets properties assets_dict = {**self.assets.as_dict()} for asset_key, asset_properties in self.assets.as_dict().items(): - asset_props_validated = props_model.safe_validate(asset_properties) + asset_props_validated = props_model.safe_validate( + asset_properties, skip_invalid=skip_invalid + ) stac_extensions.update(asset_props_validated.get_conformance_classes()) # skip invalid assets properties - invalid_asset_properties = { - k - for k in asset_properties.keys() - if k not in asset_props_validated.model_dump() - and props_model.has_field(k) - } - for key in invalid_asset_properties: - assets_dict[asset_key].pop(key, None) + if skip_invalid: + invalid_asset_properties = { + k + for k in asset_properties.keys() + if k not in asset_props_validated.model_dump() + and props_model.has_field(k) + } + for key in invalid_asset_properties: + assets_dict[asset_key].pop(key, None) geojson_repr: dict[str, Any] = { "type": "Feature", diff --git a/eodag/api/search_result.py b/eodag/api/search_result.py index 8182a68c66..4e246e0e66 100644 --- a/eodag/api/search_result.py +++ b/eodag/api/search_result.py @@ -245,8 +245,12 @@ def from_geojson(feature_collection: dict[str, Any]) -> SearchResult: """ return SearchResult.from_dict(feature_collection) - def as_dict(self) -> dict[str, Any]: - """GeoJSON representation of SearchResult""" + def as_dict(self, skip_invalid: bool = True) -> dict[str, Any]: + """GeoJSON representation of SearchResult + + :param skip_invalid: Whether to skip properties whose values are not valid according to the STAC specification. + :returns: The representation of a :class:`~eodag.api.search_result.SearchResult` as a Python dict + """ geojson_search_params = {} | (self.search_params or {}) # search_params shapely geometry to wkt @@ -257,7 +261,9 @@ def as_dict(self) -> dict[str, Any]: return { "type": "FeatureCollection", - "features": [product.as_dict() for product in self], + "features": [ + product.as_dict(skip_invalid=skip_invalid) for product in self + ], "metadata": { "eodag:number_matched": self.number_matched, "eodag:next_page_token": self.next_page_token, @@ -274,22 +280,37 @@ def as_dict(self) -> dict[str, Any]: reason="Please use 'SearchResult.as_dict' instead", version="4.1.0", ) - def as_geojson_object(self) -> dict[str, Any]: - """GeoJSON representation of SearchResult""" - return self.as_dict() + def as_geojson_object(self, skip_invalid: bool = True) -> dict[str, Any]: + """GeoJSON representation of SearchResult + + :param skip_invalid: Whether to skip properties whose values are not valid according to the STAC specification. + :returns: The representation of a :class:`~eodag.api.search_result.SearchResult` as a Python dict + """ + return self.as_dict(skip_invalid=skip_invalid) - def as_shapely_geometry_object(self) -> GeometryCollection: - """:class:`shapely.GeometryCollection` representation of SearchResult""" + def as_shapely_geometry_object( + self, skip_invalid: bool = True + ) -> GeometryCollection: + """:class:`shapely.GeometryCollection` representation of SearchResult + + :param skip_invalid: Whether to skip properties whose values are not valid according to the STAC specification. + :returns: The representation of a :class:`~eodag.api.search_result.SearchResult` as a + :class:`shapely.GeometryCollection` + """ return GeometryCollection( [ shape(feature["geometry"]).buffer(0) - for feature in self.as_dict()["features"] + for feature in self.as_dict(skip_invalid=skip_invalid)["features"] ] ) - def as_wkt_object(self) -> str: - """WKT representation of SearchResult""" - return self.as_shapely_geometry_object().wkt + def as_wkt_object(self, skip_invalid: bool = True) -> str: + """WKT representation of SearchResult + + :param skip_invalid: Whether to skip properties whose values are not valid according to the STAC specification. + :returns: The representation of a :class:`~eodag.api.search_result.SearchResult` as a WKT string + """ + return self.as_shapely_geometry_object(skip_invalid=skip_invalid).wkt @property def __geo_interface__(self) -> dict[str, Any]: diff --git a/eodag/types/stac_metadata.py b/eodag/types/stac_metadata.py index 04f9406f48..6141379e8a 100644 --- a/eodag/types/stac_metadata.py +++ b/eodag/types/stac_metadata.py @@ -213,10 +213,12 @@ def to_stac(cls, field_name: str) -> str: def safe_validate( cls: Type[T], data: dict, + skip_invalid: bool = True, ) -> T: """Validate only fields with correct types, drop others with a warning. :param data: data to validate + :param skip_invalid: whether to skip invalid fields :returns: validated model""" valid = {} @@ -225,15 +227,21 @@ def safe_validate( if value is None: continue try: - TypeAdapter(field.annotation).validate_python(value) + annotated_type = ( + Annotated[tuple([field.annotation] + field.metadata)] + if field.metadata + else field.annotation + ) + TypeAdapter(annotated_type).validate_python(value) valid[name] = value except ValidationError as e: - logger.warning( - "Dropped property %s: %s, %s", - name, - value, - e.errors()[0]["msg"], - ) + if skip_invalid: + logger.warning( + "Skipped property %s: %s, %s", + name, + value, + e.errors()[0]["msg"], + ) return cls.model_validate(valid) From ed0125525046e386e16a729b72f1a5cfdc06ef92 Mon Sep 17 00:00:00 2001 From: Sylvain Brunato Date: Tue, 31 Mar 2026 15:36:27 +0200 Subject: [PATCH 09/13] test: skip_invalid deserialize parameter --- tests/integration/test_core_search_results.py | 49 +++++++++++++++++++ 1 file changed, 49 insertions(+) diff --git a/tests/integration/test_core_search_results.py b/tests/integration/test_core_search_results.py index a55dea9682..f9daf85e70 100644 --- a/tests/integration/test_core_search_results.py +++ b/tests/integration/test_core_search_results.py @@ -253,6 +253,55 @@ def test_core_serialize_search_results_without_filename(self): finally: os.chdir(current_dir) + def test_core_serialize_search_results_skip_invalid(self): + """The core api must serialize a search results to STAC and skip invalid properties""" + with tempfile.TemporaryDirectory() as tmpdir: + tmpdir_path = Path(tmpdir) + + with tempfile.NamedTemporaryFile( + mode="w", dir=tmpdir_path, delete=False + ) as f: + + # bad formatted property + self.search_result[0].properties["eo:cloud_cover"] = "bad-formatted" + + self.dag.serialize(self.search_result, filename=f.name) + + # check links + with open(f.name) as sf: + serialized = json.load(sf) + + # property skipped + self.assertNotIn( + "eo:cloud_cover", serialized["features"][0]["properties"] + ) + + def test_core_serialize_search_results_keep_invalid(self): + """The core api must serialize a search results to STAC and keep invalid properties if asked""" + with tempfile.TemporaryDirectory() as tmpdir: + tmpdir_path = Path(tmpdir) + + with tempfile.NamedTemporaryFile( + mode="w", dir=tmpdir_path, delete=False + ) as f: + + # bad formatted property + self.search_result[0].properties["eo:cloud_cover"] = "bad-formatted" + + self.dag.serialize( + self.search_result, filename=f.name, skip_invalid=False + ) + + # check links + with open(f.name) as sf: + serialized = json.load(sf) + + # property not skipped + self.assertEqual( + serialized["features"][0]["properties"]["eo:cloud_cover"], + "bad-formatted", + ) + @mock.patch( "eodag.plugins.search.qssearch.PostJsonSearch._request", autospec=True, From 1c206d2af2a37036d2247a981df181be5a53104d Mon Sep 17 00:00:00 2001 From: Sylvain Brunato Date: Wed, 1 Apr 2026 17:11:57 +0200 Subject: [PATCH 10/13] fix: missing _dag in deserialized and register --- eodag/api/search_result.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/eodag/api/search_result.py b/eodag/api/search_result.py index 4e246e0e66..9d8a5640eb 100644 --- a/eodag/api/search_result.py +++ b/eodag/api/search_result.py @@ -206,7 +206,7 @@ def from_dict( if eodag_search_params and eodag_search_params.get("geometry"): eodag_search_params["geometry"] = shape(eodag_search_params["geometry"]) - return cls( + results = cls( products=products, number_matched=props.get("eodag:number_matched"), next_page_token=props.get("eodag:next_page_token"), @@ -214,6 +214,9 @@ def from_dict( search_params=eodag_search_params or None, raise_errors=props.get("eodag:raise_errors"), ) + if dag is not None: + results._dag = dag + return results @classmethod def from_file( From 37d25ce446c2715afaf45575b2029809707253e0 Mon Sep 17 00:00:00 2001 From: Sylvain Brunato Date: Wed, 1 Apr 2026 17:05:09 +0200 Subject: [PATCH 11/13] docs: updated api ref and guide --- docs/api_reference/eoproduct.rst | 3 +- docs/api_reference/searchresult.rst | 6 +- .../5_serialize_deserialize.ipynb | 5608 +++++++++++++++-- 3 files changed, 5157 insertions(+), 460 deletions(-) diff --git a/docs/api_reference/eoproduct.rst b/docs/api_reference/eoproduct.rst index ea764f3a46..48ec93abe1 100644 --- a/docs/api_reference/eoproduct.rst +++ b/docs/api_reference/eoproduct.rst @@ -36,7 +36,8 @@ Conversion ---------- .. automethod:: EOProduct.as_dict -.. automethod:: EOProduct.from_geojson +.. automethod:: EOProduct.from_dict +.. automethod:: EOProduct.from_file Interface --------- diff --git a/docs/api_reference/searchresult.rst b/docs/api_reference/searchresult.rst index ea4c4d72c7..9f399c0efb 100644 --- a/docs/api_reference/searchresult.rst +++ b/docs/api_reference/searchresult.rst @@ -46,8 +46,8 @@ Conversion .. autosummary:: - SearchResult.from_geojson - SearchResult.as_geojson_object + SearchResult.from_dict + SearchResult.as_dict SearchResult.as_shapely_geometry_object SearchResult.as_wkt_object @@ -60,5 +60,5 @@ Interface .. autoclass:: SearchResult :members: crunch, filter_date, filter_latest_intersect, filter_latest_by_name, filter_overlap, filter_property, - filter_online, from_geojson, as_geojson_object, as_shapely_geometry_object, as_wkt_object, next_page, + filter_online, from_dict, as_dict, as_shapely_geometry_object, as_wkt_object, next_page, __geo_interface__ diff --git a/docs/notebooks/api_user_guide/5_serialize_deserialize.ipynb b/docs/notebooks/api_user_guide/5_serialize_deserialize.ipynb index 4107e81e5f..ea70b0bf59 100644 --- a/docs/notebooks/api_user_guide/5_serialize_deserialize.ipynb +++ b/docs/notebooks/api_user_guide/5_serialize_deserialize.ipynb @@ -49,7 +49,7 @@ "metadata": {}, "outputs": [], "source": [ - "from eodag import EODataAccessGateway\n", + "from eodag import EODataAccessGateway, EOProduct, SearchResult\n", "\n", "dag = EODataAccessGateway()" ] @@ -65,6 +65,8 @@ "cell_type": "markdown", "metadata": {}, "source": [ + "### From `EODataAccessGateway`\n", + "\n", "The method [serialize()](../../api_reference/core.rst#eodag.api.core.EODataAccessGateway.serialize) allows to save a [SearchResult](../../api_reference/searchresult.rst#eodag.api.search_result.SearchResult) as a *STAC Item Collection* GeoJSON file." ] }, @@ -659,12 +661,12 @@ " }\n", " ],\n", " \"stac_extensions\": [\n", - " \"https://stac-extensions.github.io/eo/v2.0.0/schema.json\",\n", - " \"https://stac-extensions.github.io/order/v1.1.0/schema.json\",\n", " \"https://stac-extensions.github.io/grid/v1.1.0/schema.json\",\n", - " \"https://stac-extensions.github.io/processing/v1.2.0/schema.json\",\n", + " \"https://stac-extensions.github.io/product/v1.0.0/schema.json\",\n", " \"https://stac-extensions.github.io/sat/v1.1.0/schema.json\",\n", - " \"https://stac-extensions.github.io/product/v1.0.0/schema.json\"\n", + " \"https://stac-extensions.github.io/order/v1.1.0/schema.json\",\n", + " \"https://stac-extensions.github.io/processing/v1.2.0/schema.json\",\n", + " \"https://stac-extensions.github.io/eo/v2.0.0/schema.json\"\n", " ],\n", " \"stac_version\": \"1.1.0\",\n", " \"collection\": \"S2_MSI_L1C\"\n", @@ -788,12 +790,12 @@ " }\n", " ],\n", " \"stac_extensions\": [\n", - " \"https://stac-extensions.github.io/eo/v2.0.0/schema.json\",\n", - " \"https://stac-extensions.github.io/order/v1.1.0/schema.json\",\n", " \"https://stac-extensions.github.io/grid/v1.1.0/schema.json\",\n", - " \"https://stac-extensions.github.io/processing/v1.2.0/schema.json\",\n", + " \"https://stac-extensions.github.io/product/v1.0.0/schema.json\",\n", " \"https://stac-extensions.github.io/sat/v1.1.0/schema.json\",\n", - " \"https://stac-extensions.github.io/product/v1.0.0/schema.json\"\n", + " \"https://stac-extensions.github.io/order/v1.1.0/schema.json\",\n", + " \"https://stac-extensions.github.io/processing/v1.2.0/schema.json\",\n", + " \"https://stac-extensions.github.io/eo/v2.0.0/schema.json\"\n", " ],\n", " \"stac_version\": \"1.1.0\",\n", " \"collection\": \"S2_MSI_L1C\"\n", @@ -973,17 +975,9 @@ "cell_type": "markdown", "metadata": {}, "source": [ - "## Deserialize" - ] - }, - { - "cell_type": "markdown", - "metadata": {}, - "source": [ - "There are two methods offered by [EODataAccessGateway](../../api_reference/core.rst#eodag.api.core.EODataAccessGateway) to load a search result saved as a STAC Item-Collection GeoJSON:\n", + "### `SearchResult.as_dict`\n", "\n", - "* [deserialize()](../../api_reference/core.rst#eodag.api.core.EODataAccessGateway.deserialize): it simply recreates a [SearchResult](../../api_reference/searchresult.rst#eodag.api.search_result.SearchResult) and the [EOProduct](../../api_reference/eoproduct.rst#eodag.api.product._product.EOProduct) it contained\n", - "* [deserialize_and_register()](../../api_reference/core.rst#eodag.api.core.EODataAccessGateway.deserialize_and_register): it also recreates a [SearchResult](../../api_reference/searchresult.rst#eodag.api.search_result.SearchResult) but additionally registers for each [EOProduct](../../api_reference/eoproduct.rst#eodag.api.product._product.EOProduct) the information it requires to download itself and enables pagination if available by attaching the gateway instance to the products." + "[SearchResult.as_dict()](../../api_reference/searchresult.rst#eodag.api.search_result.SearchResult.as_dict) allows to directly convert search results to a serialized dictionary." ] }, { @@ -994,244 +988,4960 @@ { "data": { "text/html": [ - "\n", - " \n", - " \n", - "
\n", - " SearchResult (2)\n", - "
\n", - "
\n", - " 0 \n", - " EOProduct(id=S2B_MSIL1C_20240703T104629_N0510_R051_T31TEJ_20240703T114318, provider=cop_dataspace)\n", - " \n", - " \n", - " \n", - "\n", - " \n", - " \n", - " \n", - " \n", - " \n", - "
\n", - " EOProduct\n", - "
\n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - "
provider:'cop_dataspace',
collection:'S2_MSI_L1C',
properties["id"]:'S2B_MSIL1C_20240703T104629_N0510_R051_T31TEJ_20240703T114318',
properties["start_datetime"]:'2024-07-03T10:46:29.024000Z',
properties["end_datetime"]:'2024-07-03T10:46:29.024000Z',
\n", - "
properties: (30){\n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - "
constellation:'SENTINEL-2',
datetime:'2024-07-03T10:46:29.024000Z',
end_datetime:'2024-07-03T10:46:29.024000Z',
id:'S2B_MSIL1C_20240703T104629_N0510_R051_T31TEJ_20240703T114318',
instruments:['MSI'\n", - " ],
platform:'S2B',
providers:[{\n", - " 'name': 'ESA'\n", - " , \n", - " 'roles': ['producer'\n", - " ]\n", - " }\n", - " ,
{\n", - " 'name': 'cop_dataspace'\n", - " , \n", - " 'roles': ['host'\n", - " ]\n", - " }\n", - " ],
published:'2024-07-03T12:42:14.249198Z',
start_datetime:'2024-07-03T10:46:29.024000Z',
title:'S2B_MSIL1C_20240703T104629_N0510_R051_T31TEJ_20240703T114318',
uid:'c010825a-c3a6-46a0-948e-005521edf124',
updated:'2024-11-09T03:15:32.907273Z',
cop_dataspace:sourceProduct:'S2B_OPER_MSI_L1C_TL_2BPS_20240703T114318_A038258_T31TEJ_N05.10,S2B_OPER_MSI_L1C_DS_2BPS_20240703T114318_S20240703T104623_N05.10,S2B_OPER_MSI_L1C_TC_2BPS_20240703T114318_A038258_T31TEJ_N05.10.jp2',
cop_dataspace:sourceProductOriginDate:'2024-07-03T12:35:09Z,2024-07-03T12:23:12Z,2024-07-03T12:35:09Z',
eo:cloud_cover:14.423965639102,
eodag:download_link:'https://catalogue.dataspace.copernicus.eu/odata/v1/Products(c010825a-c3a6-46a0-948e-005521edf124)/$value',
eodag:quicklook:'https://catalogue.dataspace.copernicus.eu/odata/v1/Assets(396a9522-3f07-4645-9196-a65c349ad8e9)/$value',
eodag:thumbnail:'https://catalogue.dataspace.copernicus.eu/odata/v1/Assets(396a9522-3f07-4645-9196-a65c349ad8e9)/$value',
grid:code:'MGRS-31TEJ',
order:status:'succeeded',
processing:datetime:'2024-07-03T11:43:18.000000Z',
processing:level:'S2MSI1C',
processing:version:'05.10',
product:type:'S2MSI1C',
s2:datastrip_id:'S2B_OPER_MSI_L1C_DS_2BPS_20240703T114318_S20240703T104623_N05.10',
s2:datatake_id:'GS2B_20240703T104629_038258_N05.10',
s2:datatake_type:'INS-NOBS',
s2:tile_id:'S2B_OPER_MSI_L1C_TL_2BPS_20240703T114318_A038258_T31TEJ_N05.10',
sat:absolute_orbit:38258,
sat:relative_orbit:51,
}
\n", - "
assets: (0)
\n", - "
geometry
thumbnail
\n", - "
\n", - "
\n", - "
\n", - " 1 \n", - " EOProduct(id=S2A_MSIL1C_20240705T104021_N0510_R008_T31TEJ_20240705T142137, provider=cop_dataspace)\n", - " \n", - " \n", - " \n", - "\n", - " \n", - " \n", - "
\n", - " EOProduct\n", - "
\n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - "
provider:'cop_dataspace',
collection:'S2_MSI_L1C',
properties["id"]:'S2A_MSIL1C_20240705T104021_N0510_R008_T31TEJ_20240705T142137',
properties["start_datetime"]:'2024-07-05T10:40:21.025000Z',
properties["end_datetime"]:'2024-07-05T10:40:21.025000Z',
\n", - "
properties: (30){\n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", + "
search_results_dict
{\n",
+       "  \"type\": \"FeatureCollection\",\n",
+       "  \"features\": [\n",
+       "    {\n",
+       "      \"type\": \"Feature\",\n",
+       "      \"geometry\": {\n",
+       "        \"type\": \"Polygon\",\n",
+       "        \"coordinates\": [\n",
+       "          [\n",
+       "            [\n",
+       "              3.112156425319443,\n",
+       "              44.25274117552566\n",
+       "            ],\n",
+       "            [\n",
+       "              2.999749474120944,\n",
+       "              44.25341758107761\n",
+       "            ],\n",
+       "            [\n",
+       "              2.999750647054511,\n",
+       "              43.96999464368005\n",
+       "            ],\n",
+       "            [\n",
+       "              3.022834986511477,\n",
+       "              44.02854789058796\n",
+       "            ],\n",
+       "            [\n",
+       "              3.08123279285096,\n",
+       "              44.17410646003805\n",
+       "            ],\n",
+       "            [\n",
+       "              3.112156425319443,\n",
+       "              44.25274117552566\n",
+       "            ]\n",
+       "          ]\n",
+       "        ]\n",
+       "      },\n",
+       "      \"bbox\": [\n",
+       "        2.999749474120944,\n",
+       "        43.96999464368005,\n",
+       "        3.112156425319443,\n",
+       "        44.25341758107761\n",
+       "      ],\n",
+       "      \"id\": \"S2B_MSIL1C_20240703T104629_N0510_R051_T31TEJ_20240703T114318\",\n",
+       "      \"assets\": {},\n",
+       "      \"properties\": {\n",
+       "        \"constellation\": \"SENTINEL-2\",\n",
+       "        \"datetime\": \"2024-07-03T10:46:29.024000Z\",\n",
+       "        \"end_datetime\": \"2024-07-03T10:46:29.024000Z\",\n",
+       "        \"instruments\": [\n",
+       "          \"MSI\"\n",
+       "        ],\n",
+       "        \"platform\": \"S2B\",\n",
+       "        \"providers\": [\n",
+       "          {\n",
+       "            \"name\": \"ESA\",\n",
+       "            \"roles\": [\n",
+       "              \"producer\"\n",
+       "            ]\n",
+       "          },\n",
+       "          {\n",
+       "            \"name\": \"cop_dataspace\",\n",
+       "            \"roles\": [\n",
+       "              \"host\"\n",
+       "            ]\n",
+       "          }\n",
+       "        ],\n",
+       "        \"published\": \"2024-07-03T12:42:14.249198Z\",\n",
+       "        \"start_datetime\": \"2024-07-03T10:46:29.024000Z\",\n",
+       "        \"title\": \"S2B_MSIL1C_20240703T104629_N0510_R051_T31TEJ_20240703T114318\",\n",
+       "        \"uid\": \"c010825a-c3a6-46a0-948e-005521edf124\",\n",
+       "        \"updated\": \"2024-11-09T03:15:32.907273Z\",\n",
+       "        \"cop_dataspace:sourceProduct\": \"S2B_OPER_MSI_L1C_TL_2BPS_20240703T114318_A038258_T31TEJ_N05.10,S2B_OPER_MSI_L1C_DS_2BPS_20240703T114318_S20240703T104623_N05.10,S2B_OPER_MSI_L1C_TC_2BPS_20240703T114318_A038258_T31TEJ_N05.10.jp2\",\n",
+       "        \"cop_dataspace:sourceProductOriginDate\": \"2024-07-03T12:35:09Z,2024-07-03T12:23:12Z,2024-07-03T12:35:09Z\",\n",
+       "        \"eo:cloud_cover\": 14.423965639102,\n",
+       "        \"eodag:download_link\": \"https://catalogue.dataspace.copernicus.eu/odata/v1/Products(c010825a-c3a6-46a0-948e-005521edf124)/$value\",\n",
+       "        \"eodag:quicklook\": \"https://catalogue.dataspace.copernicus.eu/odata/v1/Assets(396a9522-3f07-4645-9196-a65c349ad8e9)/$value\",\n",
+       "        \"eodag:thumbnail\": \"https://catalogue.dataspace.copernicus.eu/odata/v1/Assets(396a9522-3f07-4645-9196-a65c349ad8e9)/$value\",\n",
+       "        \"grid:code\": \"MGRS-31TEJ\",\n",
+       "        \"order:status\": \"succeeded\",\n",
+       "        \"processing:datetime\": \"2024-07-03T11:43:18.000000Z\",\n",
+       "        \"processing:level\": \"S2MSI1C\",\n",
+       "        \"processing:version\": \"05.10\",\n",
+       "        \"product:type\": \"S2MSI1C\",\n",
+       "        \"s2:datastrip_id\": \"S2B_OPER_MSI_L1C_DS_2BPS_20240703T114318_S20240703T104623_N05.10\",\n",
+       "        \"s2:datatake_id\": \"GS2B_20240703T104629_038258_N05.10\",\n",
+       "        \"s2:datatake_type\": \"INS-NOBS\",\n",
+       "        \"s2:tile_id\": \"S2B_OPER_MSI_L1C_TL_2BPS_20240703T114318_A038258_T31TEJ_N05.10\",\n",
+       "        \"sat:absolute_orbit\": 38258,\n",
+       "        \"sat:relative_orbit\": 51,\n",
+       "        \"eodag:provider\": \"cop_dataspace\",\n",
+       "        \"eodag:search_intersection\": {\n",
+       "          \"type\": \"Polygon\",\n",
+       "          \"coordinates\": [\n",
+       "            [\n",
+       "              [\n",
+       "                3.0,\n",
+       "                43.97062712548061\n",
+       "              ],\n",
+       "              [\n",
+       "                3.0,\n",
+       "                44.0\n",
+       "              ],\n",
+       "              [\n",
+       "                3.0115801162538247,\n",
+       "                44.0\n",
+       "              ],\n",
+       "              [\n",
+       "                3.0,\n",
+       "                43.97062712548061\n",
+       "              ]\n",
+       "            ]\n",
+       "          ]\n",
+       "        }\n",
+       "      },\n",
+       "      \"links\": [\n",
+       "        {\n",
+       "          \"rel\": \"collection\",\n",
+       "          \"href\": \"S2_MSI_L1C.json\",\n",
+       "          \"type\": \"application/json\"\n",
+       "        }\n",
+       "      ],\n",
+       "      \"stac_extensions\": [\n",
+       "        \"https://stac-extensions.github.io/grid/v1.1.0/schema.json\",\n",
+       "        \"https://stac-extensions.github.io/product/v1.0.0/schema.json\",\n",
+       "        \"https://stac-extensions.github.io/sat/v1.1.0/schema.json\",\n",
+       "        \"https://stac-extensions.github.io/order/v1.1.0/schema.json\",\n",
+       "        \"https://stac-extensions.github.io/processing/v1.2.0/schema.json\",\n",
+       "        \"https://stac-extensions.github.io/eo/v2.0.0/schema.json\"\n",
+       "      ],\n",
+       "      \"stac_version\": \"1.1.0\",\n",
+       "      \"collection\": \"S2_MSI_L1C\"\n",
+       "    },\n",
+       "    {\n",
+       "      \"type\": \"Feature\",\n",
+       "      \"geometry\": {\n",
+       "        \"type\": \"Polygon\",\n",
+       "        \"coordinates\": [\n",
+       "          [\n",
+       "            [\n",
+       "              2.999749474120944,\n",
+       "              44.25341758107761\n",
+       "            ],\n",
+       "            [\n",
+       "              2.999753565511865,\n",
+       "              43.26479037737325\n",
+       "            ],\n",
+       "            [\n",
+       "              4.352494032483418,\n",
+       "              43.2567942942016\n",
+       "            ],\n",
+       "            [\n",
+       "              4.374940058749246,\n",
+       "              44.24514241182411\n",
+       "            ],\n",
+       "            [\n",
+       "              2.999749474120944,\n",
+       "              44.25341758107761\n",
+       "            ]\n",
+       "          ]\n",
+       "        ]\n",
+       "      },\n",
+       "      \"bbox\": [\n",
+       "        2.999749474120944,\n",
+       "        43.2567942942016,\n",
+       "        4.374940058749246,\n",
+       "        44.25341758107761\n",
+       "      ],\n",
+       "      \"id\": \"S2A_MSIL1C_20240705T104021_N0510_R008_T31TEJ_20240705T142137\",\n",
+       "      \"assets\": {},\n",
+       "      \"properties\": {\n",
+       "        \"constellation\": \"SENTINEL-2\",\n",
+       "        \"datetime\": \"2024-07-05T10:40:21.025000Z\",\n",
+       "        \"end_datetime\": \"2024-07-05T10:40:21.025000Z\",\n",
+       "        \"instruments\": [\n",
+       "          \"MSI\"\n",
+       "        ],\n",
+       "        \"platform\": \"S2A\",\n",
+       "        \"providers\": [\n",
+       "          {\n",
+       "            \"name\": \"ESA\",\n",
+       "            \"roles\": [\n",
+       "              \"producer\"\n",
+       "            ]\n",
+       "          },\n",
+       "          {\n",
+       "            \"name\": \"cop_dataspace\",\n",
+       "            \"roles\": [\n",
+       "              \"host\"\n",
+       "            ]\n",
+       "          }\n",
+       "        ],\n",
+       "        \"published\": \"2024-07-05T16:44:47.318744Z\",\n",
+       "        \"start_datetime\": \"2024-07-05T10:40:21.025000Z\",\n",
+       "        \"title\": \"S2A_MSIL1C_20240705T104021_N0510_R008_T31TEJ_20240705T142137\",\n",
+       "        \"uid\": \"5193fc1e-6e68-40ab-8e0f-fc1c55cb01da\",\n",
+       "        \"updated\": \"2024-11-08T21:39:34.502029Z\",\n",
+       "        \"cop_dataspace:sourceProduct\": \"S2A_OPER_MSI_L1C_TL_2APS_20240705T142137_A047195_T31TEJ_N05.10,S2A_OPER_MSI_L1C_DS_2APS_20240705T142137_S20240705T104024_N05.10,S2A_OPER_MSI_L1C_TC_2APS_20240705T142137_A047195_T31TEJ_N05.10.jp2\",\n",
+       "        \"cop_dataspace:sourceProductOriginDate\": \"2024-07-05T16:33:16Z,2024-07-05T16:32:39Z,2024-07-05T16:33:18Z\",\n",
+       "        \"eo:cloud_cover\": 59.366657708501,\n",
+       "        \"eodag:download_link\": \"https://catalogue.dataspace.copernicus.eu/odata/v1/Products(5193fc1e-6e68-40ab-8e0f-fc1c55cb01da)/$value\",\n",
+       "        \"eodag:quicklook\": \"https://catalogue.dataspace.copernicus.eu/odata/v1/Assets(afbc766b-b6cd-448c-a01a-872cff8fce36)/$value\",\n",
+       "        \"eodag:thumbnail\": \"https://catalogue.dataspace.copernicus.eu/odata/v1/Assets(afbc766b-b6cd-448c-a01a-872cff8fce36)/$value\",\n",
+       "        \"grid:code\": \"MGRS-31TEJ\",\n",
+       "        \"order:status\": \"succeeded\",\n",
+       "        \"processing:datetime\": \"2024-07-05T14:21:37.000000Z\",\n",
+       "        \"processing:level\": \"S2MSI1C\",\n",
+       "        \"processing:version\": \"05.10\",\n",
+       "        \"product:type\": \"S2MSI1C\",\n",
+       "        \"s2:datastrip_id\": \"S2A_OPER_MSI_L1C_DS_2APS_20240705T142137_S20240705T104024_N05.10\",\n",
+       "        \"s2:datatake_id\": \"GS2A_20240705T104021_047195_N05.10\",\n",
+       "        \"s2:datatake_type\": \"INS-NOBS\",\n",
+       "        \"s2:tile_id\": \"S2A_OPER_MSI_L1C_TL_2APS_20240705T142137_A047195_T31TEJ_N05.10\",\n",
+       "        \"sat:absolute_orbit\": 47195,\n",
+       "        \"sat:relative_orbit\": 8,\n",
+       "        \"eodag:provider\": \"cop_dataspace\",\n",
+       "        \"eodag:search_intersection\": {\n",
+       "          \"type\": \"Polygon\",\n",
+       "          \"coordinates\": [\n",
+       "            [\n",
+       "              [\n",
+       "                3.0,\n",
+       "                44.0\n",
+       "              ],\n",
+       "              [\n",
+       "                3.5,\n",
+       "                44.0\n",
+       "              ],\n",
+       "              [\n",
+       "                3.5,\n",
+       "                43.5\n",
+       "              ],\n",
+       "              [\n",
+       "                3.0,\n",
+       "                43.5\n",
+       "              ],\n",
+       "              [\n",
+       "                3.0,\n",
+       "                44.0\n",
+       "              ]\n",
+       "            ]\n",
+       "          ]\n",
+       "        }\n",
+       "      },\n",
+       "      \"links\": [\n",
+       "        {\n",
+       "          \"rel\": \"collection\",\n",
+       "          \"href\": \"S2_MSI_L1C.json\",\n",
+       "          \"type\": \"application/json\"\n",
+       "        }\n",
+       "      ],\n",
+       "      \"stac_extensions\": [\n",
+       "        \"https://stac-extensions.github.io/grid/v1.1.0/schema.json\",\n",
+       "        \"https://stac-extensions.github.io/product/v1.0.0/schema.json\",\n",
+       "        \"https://stac-extensions.github.io/sat/v1.1.0/schema.json\",\n",
+       "        \"https://stac-extensions.github.io/order/v1.1.0/schema.json\",\n",
+       "        \"https://stac-extensions.github.io/processing/v1.2.0/schema.json\",\n",
+       "        \"https://stac-extensions.github.io/eo/v2.0.0/schema.json\"\n",
+       "      ],\n",
+       "      \"stac_version\": \"1.1.0\",\n",
+       "      \"collection\": \"S2_MSI_L1C\"\n",
+       "    }\n",
+       "  ],\n",
+       "  \"metadata\": {\n",
+       "    \"eodag:number_matched\": null,\n",
+       "    \"eodag:next_page_token\": \"2\",\n",
+       "    \"eodag:next_page_token_key\": null,\n",
+       "    \"eodag:search_params\": {\n",
+       "      \"collection\": \"S2_MSI_L1C\",\n",
+       "      \"grid:code\": \"MGRS-31TEJ\",\n",
+       "      \"start_datetime\": \"2024-07-03\",\n",
+       "      \"end_datetime\": \"2024-07-31\",\n",
+       "      \"geometry\": {\n",
+       "        \"type\": \"Polygon\",\n",
+       "        \"coordinates\": [\n",
+       "          [\n",
+       "            [\n",
+       "              3.0,\n",
+       "              43.5\n",
+       "            ],\n",
+       "            [\n",
+       "              3.0,\n",
+       "              44.0\n",
+       "            ],\n",
+       "            [\n",
+       "              3.5,\n",
+       "              44.0\n",
+       "            ],\n",
+       "            [\n",
+       "              3.5,\n",
+       "              43.5\n",
+       "            ],\n",
+       "            [\n",
+       "              3.0,\n",
+       "              43.5\n",
+       "            ]\n",
+       "          ]\n",
+       "        ]\n",
+       "      },\n",
+       "      \"limit\": 2\n",
+       "    },\n",
+       "    \"eodag:raise_errors\": false\n",
+       "  },\n",
+       "  \"links\": [],\n",
+       "  \"stac_extensions\": [],\n",
+       "  \"stac_version\": \"1.1.0\"\n",
+       "}
" + ], + "text/plain": [ + "" + ] + }, + "execution_count": 10, + "metadata": {}, + "output_type": "execute_result" + } + ], + "source": [ + "search_results_dict = search_results.as_dict()\n", + "collapsible_json(search_results_dict, \"search_results_dict\")" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "### `SearchResult.as_shapely_geometry_object`\n", + "\n", + "[SearchResult.as_shapely_geometry_object()](../../api_reference/searchresult.rst#eodag.api.search_result.SearchResult.as_shapely_geometry_object) will return a [shapely.GeometryCollection](https://shapely.readthedocs.io/en/stable/reference/shapely.GeometryCollection.html) containing the results geometries." + ] + }, + { + "cell_type": "code", + "execution_count": 11, + "metadata": {}, + "outputs": [ + { + "data": { + "image/svg+xml": [ + "" + ], + "text/plain": [ + "" + ] + }, + "execution_count": 11, + "metadata": {}, + "output_type": "execute_result" + } + ], + "source": [ + "search_results.as_shapely_geometry_object()" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "### `SearchResult.as_wkt_object`\n", + "\n", + "[SearchResult.as_shapely_geometry_object()](../../api_reference/searchresult.rst#eodag.api.search_result.SearchResult.as_shapely_geometry_object) will return the WKT representation of results geometries." + ] + }, + { + "cell_type": "code", + "execution_count": 12, + "metadata": {}, + "outputs": [ + { + "data": { + "text/plain": [ + "'GEOMETRYCOLLECTION (POLYGON ((3.112156425319443 44.25274117552566, 3.08123279285096 44.17410646003805, 3.022834986511477 44.02854789058796, 2.999750647054511 43.96999464368005, 2.999749474120944 44.25341758107761, 3.112156425319443 44.25274117552566)), POLYGON ((2.999749474120944 44.25341758107761, 4.374940058749246 44.24514241182411, 4.352494032483418 43.2567942942016, 2.999753565511865 43.26479037737325, 2.999749474120944 44.25341758107761)))'" + ] + }, + "execution_count": 12, + "metadata": {}, + "output_type": "execute_result" + } + ], + "source": [ + "search_results.as_wkt_object()" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "### `EOProduct.as_dict`\n", + "\n", + "[EOProduct.as_dict()](../../api_reference/eoproduct.rst#eodag.api.product._product.EOProduct.as_dict) allows to directly convert a single product to a serialized dictionary." + ] + }, + { + "cell_type": "code", + "execution_count": 13, + "metadata": {}, + "outputs": [ + { + "data": { + "text/html": [ + "
product_dict
{\n",
+       "  \"type\": \"Feature\",\n",
+       "  \"geometry\": {\n",
+       "    \"type\": \"Polygon\",\n",
+       "    \"coordinates\": [\n",
+       "      [\n",
+       "        [\n",
+       "          3.112156425319443,\n",
+       "          44.25274117552566\n",
+       "        ],\n",
+       "        [\n",
+       "          2.999749474120944,\n",
+       "          44.25341758107761\n",
+       "        ],\n",
+       "        [\n",
+       "          2.999750647054511,\n",
+       "          43.96999464368005\n",
+       "        ],\n",
+       "        [\n",
+       "          3.022834986511477,\n",
+       "          44.02854789058796\n",
+       "        ],\n",
+       "        [\n",
+       "          3.08123279285096,\n",
+       "          44.17410646003805\n",
+       "        ],\n",
+       "        [\n",
+       "          3.112156425319443,\n",
+       "          44.25274117552566\n",
+       "        ]\n",
+       "      ]\n",
+       "    ]\n",
+       "  },\n",
+       "  \"bbox\": [\n",
+       "    2.999749474120944,\n",
+       "    43.96999464368005,\n",
+       "    3.112156425319443,\n",
+       "    44.25341758107761\n",
+       "  ],\n",
+       "  \"id\": \"S2B_MSIL1C_20240703T104629_N0510_R051_T31TEJ_20240703T114318\",\n",
+       "  \"assets\": {},\n",
+       "  \"properties\": {\n",
+       "    \"constellation\": \"SENTINEL-2\",\n",
+       "    \"datetime\": \"2024-07-03T10:46:29.024000Z\",\n",
+       "    \"end_datetime\": \"2024-07-03T10:46:29.024000Z\",\n",
+       "    \"instruments\": [\n",
+       "      \"MSI\"\n",
+       "    ],\n",
+       "    \"platform\": \"S2B\",\n",
+       "    \"providers\": [\n",
+       "      {\n",
+       "        \"name\": \"ESA\",\n",
+       "        \"roles\": [\n",
+       "          \"producer\"\n",
+       "        ]\n",
+       "      },\n",
+       "      {\n",
+       "        \"name\": \"cop_dataspace\",\n",
+       "        \"roles\": [\n",
+       "          \"host\"\n",
+       "        ]\n",
+       "      }\n",
+       "    ],\n",
+       "    \"published\": \"2024-07-03T12:42:14.249198Z\",\n",
+       "    \"start_datetime\": \"2024-07-03T10:46:29.024000Z\",\n",
+       "    \"title\": \"S2B_MSIL1C_20240703T104629_N0510_R051_T31TEJ_20240703T114318\",\n",
+       "    \"uid\": \"c010825a-c3a6-46a0-948e-005521edf124\",\n",
+       "    \"updated\": \"2024-11-09T03:15:32.907273Z\",\n",
+       "    \"cop_dataspace:sourceProduct\": \"S2B_OPER_MSI_L1C_TL_2BPS_20240703T114318_A038258_T31TEJ_N05.10,S2B_OPER_MSI_L1C_DS_2BPS_20240703T114318_S20240703T104623_N05.10,S2B_OPER_MSI_L1C_TC_2BPS_20240703T114318_A038258_T31TEJ_N05.10.jp2\",\n",
+       "    \"cop_dataspace:sourceProductOriginDate\": \"2024-07-03T12:35:09Z,2024-07-03T12:23:12Z,2024-07-03T12:35:09Z\",\n",
+       "    \"eo:cloud_cover\": 14.423965639102,\n",
+       "    \"eodag:download_link\": \"https://catalogue.dataspace.copernicus.eu/odata/v1/Products(c010825a-c3a6-46a0-948e-005521edf124)/$value\",\n",
+       "    \"eodag:quicklook\": \"https://catalogue.dataspace.copernicus.eu/odata/v1/Assets(396a9522-3f07-4645-9196-a65c349ad8e9)/$value\",\n",
+       "    \"eodag:thumbnail\": \"https://catalogue.dataspace.copernicus.eu/odata/v1/Assets(396a9522-3f07-4645-9196-a65c349ad8e9)/$value\",\n",
+       "    \"grid:code\": \"MGRS-31TEJ\",\n",
+       "    \"order:status\": \"succeeded\",\n",
+       "    \"processing:datetime\": \"2024-07-03T11:43:18.000000Z\",\n",
+       "    \"processing:level\": \"S2MSI1C\",\n",
+       "    \"processing:version\": \"05.10\",\n",
+       "    \"product:type\": \"S2MSI1C\",\n",
+       "    \"s2:datastrip_id\": \"S2B_OPER_MSI_L1C_DS_2BPS_20240703T114318_S20240703T104623_N05.10\",\n",
+       "    \"s2:datatake_id\": \"GS2B_20240703T104629_038258_N05.10\",\n",
+       "    \"s2:datatake_type\": \"INS-NOBS\",\n",
+       "    \"s2:tile_id\": \"S2B_OPER_MSI_L1C_TL_2BPS_20240703T114318_A038258_T31TEJ_N05.10\",\n",
+       "    \"sat:absolute_orbit\": 38258,\n",
+       "    \"sat:relative_orbit\": 51,\n",
+       "    \"eodag:provider\": \"cop_dataspace\",\n",
+       "    \"eodag:search_intersection\": {\n",
+       "      \"type\": \"Polygon\",\n",
+       "      \"coordinates\": [\n",
+       "        [\n",
+       "          [\n",
+       "            3.0,\n",
+       "            43.97062712548061\n",
+       "          ],\n",
+       "          [\n",
+       "            3.0,\n",
+       "            44.0\n",
+       "          ],\n",
+       "          [\n",
+       "            3.0115801162538247,\n",
+       "            44.0\n",
+       "          ],\n",
+       "          [\n",
+       "            3.0,\n",
+       "            43.97062712548061\n",
+       "          ]\n",
+       "        ]\n",
+       "      ]\n",
+       "    }\n",
+       "  },\n",
+       "  \"links\": [\n",
+       "    {\n",
+       "      \"rel\": \"collection\",\n",
+       "      \"href\": \"S2_MSI_L1C.json\",\n",
+       "      \"type\": \"application/json\"\n",
+       "    }\n",
+       "  ],\n",
+       "  \"stac_extensions\": [\n",
+       "    \"https://stac-extensions.github.io/grid/v1.1.0/schema.json\",\n",
+       "    \"https://stac-extensions.github.io/product/v1.0.0/schema.json\",\n",
+       "    \"https://stac-extensions.github.io/sat/v1.1.0/schema.json\",\n",
+       "    \"https://stac-extensions.github.io/order/v1.1.0/schema.json\",\n",
+       "    \"https://stac-extensions.github.io/processing/v1.2.0/schema.json\",\n",
+       "    \"https://stac-extensions.github.io/eo/v2.0.0/schema.json\"\n",
+       "  ],\n",
+       "  \"stac_version\": \"1.1.0\",\n",
+       "  \"collection\": \"S2_MSI_L1C\"\n",
+       "}
" + ], + "text/plain": [ + "" + ] + }, + "execution_count": 13, + "metadata": {}, + "output_type": "execute_result" + } + ], + "source": [ + "product_dict = search_results[0].as_dict()\n", + "collapsible_json(product_dict, \"product_dict\")" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Deserialize" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "### From `EODataAccessGateway`\n", + "\n", + "There are two methods offered by [EODataAccessGateway](../../api_reference/core.rst#eodag.api.core.EODataAccessGateway) to load a search result saved as a STAC Item-Collection GeoJSON:\n", + "\n", + "* [deserialize()](../../api_reference/core.rst#eodag.api.core.EODataAccessGateway.deserialize): it simply recreates a [SearchResult](../../api_reference/searchresult.rst#eodag.api.search_result.SearchResult) and the [EOProduct](../../api_reference/eoproduct.rst#eodag.api.product._product.EOProduct) objects it contained. Can be used without `EODataAccessGateway` instance, but object will not be downloadable.\n", + " \n", + "* [deserialize_and_register()](../../api_reference/core.rst#eodag.api.core.EODataAccessGateway.deserialize_and_register): it also recreates a [SearchResult](../../api_reference/searchresult.rst#eodag.api.search_result.SearchResult) but additionally registers for each [EOProduct](../../api_reference/eoproduct.rst#eodag.api.product._product.EOProduct) the information it requires to download itself and enables pagination if available by attaching the gateway instance to the products." + ] + }, + { + "cell_type": "code", + "execution_count": 14, + "metadata": {}, + "outputs": [ + { + "data": { + "text/html": [ + "
constellation:'SENTINEL-2',
datetime:'2024-07-05T10:40:21.025000Z',
end_datetime:'2024-07-05T10:40:21.025000Z',
id:'S2A_MSIL1C_20240705T104021_N0510_R008_T31TEJ_20240705T142137',
instruments:['MSI'\n", - " ],
platform:'S2A',
\n", + " \n", + " \n", + " \n", + "
\n", + " SearchResult (2)\n", + "
\n", + "
\n", + " 0 \n", + " EOProduct(id=S2B_MSIL1C_20240703T104629_N0510_R051_T31TEJ_20240703T114318, provider=cop_dataspace)\n", + " \n", + " \n", + " \n", + "\n", + " \n", + " \n", + " \n", + " \n", + " \n", + "
\n", + " EOProduct\n", + "
\n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + "
provider:'cop_dataspace',
collection:'S2_MSI_L1C',
properties["id"]:'S2B_MSIL1C_20240703T104629_N0510_R051_T31TEJ_20240703T114318',
properties["start_datetime"]:'2024-07-03T10:46:29.024000Z',
properties["end_datetime"]:'2024-07-03T10:46:29.024000Z',
\n", + "
properties: (30){\n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + "
constellation:'SENTINEL-2',
datetime:'2024-07-03T10:46:29.024000Z',
end_datetime:'2024-07-03T10:46:29.024000Z',
id:'S2B_MSIL1C_20240703T104629_N0510_R051_T31TEJ_20240703T114318',
instruments:['MSI'\n", + " ],
platform:'S2B',
providers:[{\n", + " 'name': 'ESA'\n", + " , \n", + " 'roles': ['producer'\n", + " ]\n", + " }\n", + " ,
{\n", + " 'name': 'cop_dataspace'\n", + " , \n", + " 'roles': ['host'\n", + " ]\n", + " }\n", + " ],
published:'2024-07-03T12:42:14.249198Z',
start_datetime:'2024-07-03T10:46:29.024000Z',
title:'S2B_MSIL1C_20240703T104629_N0510_R051_T31TEJ_20240703T114318',
uid:'c010825a-c3a6-46a0-948e-005521edf124',
updated:'2024-11-09T03:15:32.907273Z',
cop_dataspace:sourceProduct:'S2B_OPER_MSI_L1C_TL_2BPS_20240703T114318_A038258_T31TEJ_N05.10,S2B_OPER_MSI_L1C_DS_2BPS_20240703T114318_S20240703T104623_N05.10,S2B_OPER_MSI_L1C_TC_2BPS_20240703T114318_A038258_T31TEJ_N05.10.jp2',
cop_dataspace:sourceProductOriginDate:'2024-07-03T12:35:09Z,2024-07-03T12:23:12Z,2024-07-03T12:35:09Z',
eo:cloud_cover:14.423965639102,
eodag:download_link:'https://catalogue.dataspace.copernicus.eu/odata/v1/Products(c010825a-c3a6-46a0-948e-005521edf124)/$value',
eodag:quicklook:'https://catalogue.dataspace.copernicus.eu/odata/v1/Assets(396a9522-3f07-4645-9196-a65c349ad8e9)/$value',
eodag:thumbnail:'https://catalogue.dataspace.copernicus.eu/odata/v1/Assets(396a9522-3f07-4645-9196-a65c349ad8e9)/$value',
grid:code:'MGRS-31TEJ',
order:status:'succeeded',
processing:datetime:'2024-07-03T11:43:18.000000Z',
processing:level:'S2MSI1C',
processing:version:'05.10',
product:type:'S2MSI1C',
s2:datastrip_id:'S2B_OPER_MSI_L1C_DS_2BPS_20240703T114318_S20240703T104623_N05.10',
s2:datatake_id:'GS2B_20240703T104629_038258_N05.10',
s2:datatake_type:'INS-NOBS',
s2:tile_id:'S2B_OPER_MSI_L1C_TL_2BPS_20240703T114318_A038258_T31TEJ_N05.10',
sat:absolute_orbit:38258,
sat:relative_orbit:51,
}
\n", + "
assets: (0)
\n", + "
geometry
thumbnail
\n", + "
\n", + "
\n", + "
\n", + " 1 \n", + " EOProduct(id=S2A_MSIL1C_20240705T104021_N0510_R008_T31TEJ_20240705T142137, provider=cop_dataspace)\n", + " \n", + " \n", + " \n", + "\n", + " \n", + " \n", + " \n", + " \n", + " \n", + "
\n", + " EOProduct\n", + "
\n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + "
provider:'cop_dataspace',
collection:'S2_MSI_L1C',
properties["id"]:'S2A_MSIL1C_20240705T104021_N0510_R008_T31TEJ_20240705T142137',
properties["start_datetime"]:'2024-07-05T10:40:21.025000Z',
properties["end_datetime"]:'2024-07-05T10:40:21.025000Z',
\n", + "
properties: (30){\n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + "
constellation:'SENTINEL-2',
datetime:'2024-07-05T10:40:21.025000Z',
end_datetime:'2024-07-05T10:40:21.025000Z',
id:'S2A_MSIL1C_20240705T104021_N0510_R008_T31TEJ_20240705T142137',
instruments:['MSI'\n", + " ],
platform:'S2A',
providers:[{\n", + " 'name': 'ESA'\n", + " , \n", + " 'roles': ['producer'\n", + " ]\n", + " }\n", + " ,
{\n", + " 'name': 'cop_dataspace'\n", + " , \n", + " 'roles': ['host'\n", + " ]\n", + " }\n", + " ],
published:'2024-07-05T16:44:47.318744Z',
start_datetime:'2024-07-05T10:40:21.025000Z',
title:'S2A_MSIL1C_20240705T104021_N0510_R008_T31TEJ_20240705T142137',
uid:'5193fc1e-6e68-40ab-8e0f-fc1c55cb01da',
updated:'2024-11-08T21:39:34.502029Z',
cop_dataspace:sourceProduct:'S2A_OPER_MSI_L1C_TL_2APS_20240705T142137_A047195_T31TEJ_N05.10,S2A_OPER_MSI_L1C_DS_2APS_20240705T142137_S20240705T104024_N05.10,S2A_OPER_MSI_L1C_TC_2APS_20240705T142137_A047195_T31TEJ_N05.10.jp2',
cop_dataspace:sourceProductOriginDate:'2024-07-05T16:33:16Z,2024-07-05T16:32:39Z,2024-07-05T16:33:18Z',
eo:cloud_cover:59.366657708501,
eodag:download_link:'https://catalogue.dataspace.copernicus.eu/odata/v1/Products(5193fc1e-6e68-40ab-8e0f-fc1c55cb01da)/$value',
eodag:quicklook:'https://catalogue.dataspace.copernicus.eu/odata/v1/Assets(afbc766b-b6cd-448c-a01a-872cff8fce36)/$value',
eodag:thumbnail:'https://catalogue.dataspace.copernicus.eu/odata/v1/Assets(afbc766b-b6cd-448c-a01a-872cff8fce36)/$value',
grid:code:'MGRS-31TEJ',
order:status:'succeeded',
processing:datetime:'2024-07-05T14:21:37.000000Z',
processing:level:'S2MSI1C',
processing:version:'05.10',
product:type:'S2MSI1C',
s2:datastrip_id:'S2A_OPER_MSI_L1C_DS_2APS_20240705T142137_S20240705T104024_N05.10',
s2:datatake_id:'GS2A_20240705T104021_047195_N05.10',
s2:datatake_type:'INS-NOBS',
s2:tile_id:'S2A_OPER_MSI_L1C_TL_2APS_20240705T142137_A047195_T31TEJ_N05.10',
sat:absolute_orbit:47195,
sat:relative_orbit:8,
}
\n", + "
assets: (0)
\n", + "
geometry
thumbnail
\n", + "
\n", + "
" + ], + "text/plain": [ + "SearchResult([EOProduct(id=S2B_MSIL1C_20240703T104629_N0510_R051_T31TEJ_20240703T114318, provider=cop_dataspace),\n", + " EOProduct(id=S2A_MSIL1C_20240705T104021_N0510_R008_T31TEJ_20240705T142137, provider=cop_dataspace)])" + ] + }, + "execution_count": 14, + "metadata": {}, + "output_type": "execute_result" + } + ], + "source": [ + "deserialized_search_results = dag.deserialize(output_file)\n", + "deserialized_search_results" + ] + }, + { + "cell_type": "code", + "execution_count": 15, + "metadata": {}, + "outputs": [ + { + "ename": "RuntimeError", + "evalue": "EO product is unable to download itself due to lacking of a download plugin", + "output_type": "error", + "traceback": [ + "\u001b[31mRuntimeError\u001b[39m\u001b[31m:\u001b[39m EO product is unable to download itself due to lacking of a download plugin\n" + ] + } + ], + "source": [ + "deserialized_search_results[0].download()" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "Trying to download a product from a [SearchResult](../../api_reference/searchresult.rst#eodag.api.search_result.SearchResult) that was loaded with [serialize()](../../api_reference/core.rst#eodag.api.core.EODataAccessGateway.deserialize) since it doesn't try to configure each product so that it can be downloaded." + ] + }, + { + "cell_type": "code", + "execution_count": 16, + "metadata": {}, + "outputs": [ + { + "data": { + "text/html": [ + "\n", + " \n", + " \n", + " \n", + "
\n", + " SearchResult (2)\n", + "
\n", + "
\n", + " 0 \n", + " EOProduct(id=S2B_MSIL1C_20240703T104629_N0510_R051_T31TEJ_20240703T114318, provider=cop_dataspace)\n", + " \n", + " \n", + " \n", + "\n", + " \n", + " \n", + " \n", + " \n", + " \n", + "
\n", + " EOProduct\n", + "
\n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + "
provider:'cop_dataspace',
collection:'S2_MSI_L1C',
properties["id"]:'S2B_MSIL1C_20240703T104629_N0510_R051_T31TEJ_20240703T114318',
properties["start_datetime"]:'2024-07-03T10:46:29.024000Z',
properties["end_datetime"]:'2024-07-03T10:46:29.024000Z',
\n", + "
properties: (30){\n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + "
constellation:'SENTINEL-2',
datetime:'2024-07-03T10:46:29.024000Z',
end_datetime:'2024-07-03T10:46:29.024000Z',
id:'S2B_MSIL1C_20240703T104629_N0510_R051_T31TEJ_20240703T114318',
instruments:['MSI'\n", + " ],
platform:'S2B',
providers:[{\n", + " 'name': 'ESA'\n", + " , \n", + " 'roles': ['producer'\n", + " ]\n", + " }\n", + " ,
{\n", + " 'name': 'cop_dataspace'\n", + " , \n", + " 'roles': ['host'\n", + " ]\n", + " }\n", + " ],
published:'2024-07-03T12:42:14.249198Z',
start_datetime:'2024-07-03T10:46:29.024000Z',
title:'S2B_MSIL1C_20240703T104629_N0510_R051_T31TEJ_20240703T114318',
uid:'c010825a-c3a6-46a0-948e-005521edf124',
updated:'2024-11-09T03:15:32.907273Z',
cop_dataspace:sourceProduct:'S2B_OPER_MSI_L1C_TL_2BPS_20240703T114318_A038258_T31TEJ_N05.10,S2B_OPER_MSI_L1C_DS_2BPS_20240703T114318_S20240703T104623_N05.10,S2B_OPER_MSI_L1C_TC_2BPS_20240703T114318_A038258_T31TEJ_N05.10.jp2',
cop_dataspace:sourceProductOriginDate:'2024-07-03T12:35:09Z,2024-07-03T12:23:12Z,2024-07-03T12:35:09Z',
eo:cloud_cover:14.423965639102,
eodag:download_link:'https://catalogue.dataspace.copernicus.eu/odata/v1/Products(c010825a-c3a6-46a0-948e-005521edf124)/$value',
eodag:quicklook:'https://catalogue.dataspace.copernicus.eu/odata/v1/Assets(396a9522-3f07-4645-9196-a65c349ad8e9)/$value',
eodag:thumbnail:'https://catalogue.dataspace.copernicus.eu/odata/v1/Assets(396a9522-3f07-4645-9196-a65c349ad8e9)/$value',
grid:code:'MGRS-31TEJ',
order:status:'succeeded',
processing:datetime:'2024-07-03T11:43:18.000000Z',
processing:level:'S2MSI1C',
processing:version:'05.10',
product:type:'S2MSI1C',
s2:datastrip_id:'S2B_OPER_MSI_L1C_DS_2BPS_20240703T114318_S20240703T104623_N05.10',
s2:datatake_id:'GS2B_20240703T104629_038258_N05.10',
s2:datatake_type:'INS-NOBS',
s2:tile_id:'S2B_OPER_MSI_L1C_TL_2BPS_20240703T114318_A038258_T31TEJ_N05.10',
sat:absolute_orbit:38258,
sat:relative_orbit:51,
}
\n", + "
assets: (0)
\n", + "
geometry
thumbnail
\n", + "
\n", + "
\n", + "
\n", + " 1 \n", + " EOProduct(id=S2A_MSIL1C_20240705T104021_N0510_R008_T31TEJ_20240705T142137, provider=cop_dataspace)\n", + " \n", + " \n", + " \n", + "\n", + " \n", + " \n", + " \n", + " \n", + " \n", + "
\n", + " EOProduct\n", + "
\n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + "
provider:'cop_dataspace',
collection:'S2_MSI_L1C',
properties["id"]:'S2A_MSIL1C_20240705T104021_N0510_R008_T31TEJ_20240705T142137',
properties["start_datetime"]:'2024-07-05T10:40:21.025000Z',
properties["end_datetime"]:'2024-07-05T10:40:21.025000Z',
\n", + "
properties: (30){\n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + "
constellation:'SENTINEL-2',
datetime:'2024-07-05T10:40:21.025000Z',
end_datetime:'2024-07-05T10:40:21.025000Z',
id:'S2A_MSIL1C_20240705T104021_N0510_R008_T31TEJ_20240705T142137',
instruments:['MSI'\n", + " ],
platform:'S2A',
providers:[{\n", + " 'name': 'ESA'\n", + " , \n", + " 'roles': ['producer'\n", + " ]\n", + " }\n", + " ,
{\n", + " 'name': 'cop_dataspace'\n", + " , \n", + " 'roles': ['host'\n", + " ]\n", + " }\n", + " ],
published:'2024-07-05T16:44:47.318744Z',
start_datetime:'2024-07-05T10:40:21.025000Z',
title:'S2A_MSIL1C_20240705T104021_N0510_R008_T31TEJ_20240705T142137',
uid:'5193fc1e-6e68-40ab-8e0f-fc1c55cb01da',
updated:'2024-11-08T21:39:34.502029Z',
cop_dataspace:sourceProduct:'S2A_OPER_MSI_L1C_TL_2APS_20240705T142137_A047195_T31TEJ_N05.10,S2A_OPER_MSI_L1C_DS_2APS_20240705T142137_S20240705T104024_N05.10,S2A_OPER_MSI_L1C_TC_2APS_20240705T142137_A047195_T31TEJ_N05.10.jp2',
cop_dataspace:sourceProductOriginDate:'2024-07-05T16:33:16Z,2024-07-05T16:32:39Z,2024-07-05T16:33:18Z',
eo:cloud_cover:59.366657708501,
eodag:download_link:'https://catalogue.dataspace.copernicus.eu/odata/v1/Products(5193fc1e-6e68-40ab-8e0f-fc1c55cb01da)/$value',
eodag:quicklook:'https://catalogue.dataspace.copernicus.eu/odata/v1/Assets(afbc766b-b6cd-448c-a01a-872cff8fce36)/$value',
eodag:thumbnail:'https://catalogue.dataspace.copernicus.eu/odata/v1/Assets(afbc766b-b6cd-448c-a01a-872cff8fce36)/$value',
grid:code:'MGRS-31TEJ',
order:status:'succeeded',
processing:datetime:'2024-07-05T14:21:37.000000Z',
processing:level:'S2MSI1C',
processing:version:'05.10',
product:type:'S2MSI1C',
s2:datastrip_id:'S2A_OPER_MSI_L1C_DS_2APS_20240705T142137_S20240705T104024_N05.10',
s2:datatake_id:'GS2A_20240705T104021_047195_N05.10',
s2:datatake_type:'INS-NOBS',
s2:tile_id:'S2A_OPER_MSI_L1C_TL_2APS_20240705T142137_A047195_T31TEJ_N05.10',
sat:absolute_orbit:47195,
sat:relative_orbit:8,
}
\n", + "
assets: (0)
\n", + "
geometry
thumbnail
\n", + "
\n", + "
" + ], + "text/plain": [ + "SearchResult([EOProduct(id=S2B_MSIL1C_20240703T104629_N0510_R051_T31TEJ_20240703T114318, provider=cop_dataspace),\n", + " EOProduct(id=S2A_MSIL1C_20240705T104021_N0510_R008_T31TEJ_20240705T142137, provider=cop_dataspace)])" + ] + }, + "execution_count": 16, + "metadata": {}, + "output_type": "execute_result" + } + ], + "source": [ + "deserialized_and_registered = dag.deserialize_and_register(output_file)\n", + "deserialized_and_registered" + ] + }, + { + "cell_type": "code", + "execution_count": 17, + "metadata": {}, + "outputs": [ + { + "data": { + "application/vnd.jupyter.widget-view+json": { + "model_id": "c1e4ded5c506498c8d86591db8490b6b", + "version_major": 2, + "version_minor": 0 + }, + "text/plain": [ + "0.00B [00:00, ?B/s]" + ] + }, + "metadata": {}, + "output_type": "display_data" + } + ], + "source": [ + "product_path = deserialized_and_registered[0].download(\n", + " output_dir=workspace,\n", + ")" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "Downloading the product with [deserialize_and_register()](../../api_reference/core.rst#eodag.api.core.EODataAccessGateway.deserialize_and_register) works as expected." + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "After using `deserialize_and_register`, you can access the next page of results (if available):\n" + ] + }, + { + "cell_type": "code", + "execution_count": 18, + "metadata": {}, + "outputs": [ + { + "data": { + "text/html": [ + "\n", + " \n", + " \n", + " \n", + "
\n", + " SearchResult (2)\n", + "
\n", + "
\n", + " 0 \n", + " EOProduct(id=S2A_MSIL1C_20240708T105031_N0510_R051_T31TEJ_20240708T125024, provider=cop_dataspace)\n", + " \n", + " \n", + " \n", + "\n", + " \n", + " \n", + " \n", + " \n", + " \n", + "
\n", + " EOProduct\n", + "
\n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + "
provider:'cop_dataspace',
collection:'S2_MSI_L1C',
properties["id"]:'S2A_MSIL1C_20240708T105031_N0510_R051_T31TEJ_20240708T125024',
properties["start_datetime"]:'2024-07-08T10:50:31.024000Z',
properties["end_datetime"]:'2024-07-08T10:50:31.024000Z',
\n", + "
properties: (30){\n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + "
constellation:'SENTINEL-2',
datetime:'2024-07-08T10:50:31.024000Z',
end_datetime:'2024-07-08T10:50:31.024000Z',
id:'S2A_MSIL1C_20240708T105031_N0510_R051_T31TEJ_20240708T125024',
instruments:['MSI'\n", + " ],
platform:'S2A',
providers:[{\n", + " 'name': 'ESA'\n", + " , \n", + " 'roles': ['producer'\n", + " ]\n", + " }\n", + " ],
published:'2024-07-08T15:06:53.189989Z',
start_datetime:'2024-07-08T10:50:31.024000Z',
title:'S2A_MSIL1C_20240708T105031_N0510_R051_T31TEJ_20240708T125024',
uid:'cb65260d-58b9-471a-8aa9-3263e97d6bd4',
updated:'2024-11-08T13:10:28.998813Z',
cop_dataspace:sourceProduct:'S2A_OPER_MSI_L1C_TL_2APS_20240708T125024_A047238_T31TEJ_N05.10,S2A_OPER_MSI_L1C_DS_2APS_20240708T125024_S20240708T105028_N05.10,S2A_OPER_MSI_L1C_TC_2APS_20240708T125024_A047238_T31TEJ_N05.10.jp2',
cop_dataspace:sourceProductOriginDate:'2024-07-08T14:59:09Z,2024-07-08T14:59:04Z,2024-07-08T14:59:10Z',
eo:cloud_cover:0.0,
eodag:download_link:'https://catalogue.dataspace.copernicus.eu/odata/v1/Products(cb65260d-58b9-471a-8aa9-3263e97d6bd4)/$value',
eodag:quicklook:'https://catalogue.dataspace.copernicus.eu/odata/v1/Assets(2456fc96-b92b-4310-a088-8932f1db0095)/$value',
eodag:thumbnail:'https://catalogue.dataspace.copernicus.eu/odata/v1/Assets(2456fc96-b92b-4310-a088-8932f1db0095)/$value',
grid:code:'MGRS-31TEJ',
order:status:'succeeded',
processing:datetime:'2024-07-08T12:50:24.000000Z',
processing:level:'S2MSI1C',
processing:version:'05.10',
product:type:'S2MSI1C',
s2:datastrip_id:'S2A_OPER_MSI_L1C_DS_2APS_20240708T125024_S20240708T105028_N05.10',
s2:datatake_id:'GS2A_20240708T105031_047238_N05.10',
s2:datatake_type:'INS-NOBS',
s2:tile_id:'S2A_OPER_MSI_L1C_TL_2APS_20240708T125024_A047238_T31TEJ_N05.10',
sat:absolute_orbit:47238,
sat:relative_orbit:51,
}
\n", + "
assets: (0)
\n", + "
geometry
thumbnail
\n", + "
\n", + "
\n", + "
\n", + " 1 \n", + " EOProduct(id=S2B_MSIL1C_20240710T103629_N0510_R008_T31TEJ_20240710T131044, provider=cop_dataspace)\n", + " \n", + " \n", + " \n", + "\n", + " \n", + " \n", + " \n", + " \n", + " \n", + "
\n", + " EOProduct\n", + "
\n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + "
provider:'cop_dataspace',
collection:'S2_MSI_L1C',
properties["id"]:'S2B_MSIL1C_20240710T103629_N0510_R008_T31TEJ_20240710T131044',
properties["start_datetime"]:'2024-07-10T10:36:29.024000Z',
properties["end_datetime"]:'2024-07-10T10:36:29.024000Z',
\n", + "
properties: (30){\n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + "
constellation:'SENTINEL-2',
datetime:'2024-07-10T10:36:29.024000Z',
end_datetime:'2024-07-10T10:36:29.024000Z',
id:'S2B_MSIL1C_20240710T103629_N0510_R008_T31TEJ_20240710T131044',
instruments:['MSI'\n", + " ],
platform:'S2B',
providers:[{\n", + " 'name': 'ESA'\n", + " , \n", + " 'roles': ['producer'\n", + " ]\n", + " }\n", + " ],
published:'2024-07-10T14:34:08.835998Z',
start_datetime:'2024-07-10T10:36:29.024000Z',
title:'S2B_MSIL1C_20240710T103629_N0510_R008_T31TEJ_20240710T131044',
uid:'ed2523a6-143b-48e0-a663-a572a0bf8a6e',
updated:'2024-11-07T15:13:13.209267Z',
cop_dataspace:sourceProduct:'S2B_OPER_MSI_L1C_TL_2BPS_20240710T131044_A038358_T31TEJ_N05.10,S2B_OPER_MSI_L1C_DS_2BPS_20240710T131044_S20240710T103819_N05.10,S2B_OPER_MSI_L1C_TC_2BPS_20240710T131044_A038358_T31TEJ_N05.10.jp2',
cop_dataspace:sourceProductOriginDate:'2024-07-10T14:21:50Z,2024-07-10T13:50:48Z,2024-07-10T14:21:40Z',
eo:cloud_cover:0.058048911583,
eodag:download_link:'https://catalogue.dataspace.copernicus.eu/odata/v1/Products(ed2523a6-143b-48e0-a663-a572a0bf8a6e)/$value',
eodag:quicklook:'https://catalogue.dataspace.copernicus.eu/odata/v1/Assets(0e6919dd-86b8-4a71-83c7-af156ae7838b)/$value',
eodag:thumbnail:'https://catalogue.dataspace.copernicus.eu/odata/v1/Assets(0e6919dd-86b8-4a71-83c7-af156ae7838b)/$value',
grid:code:'MGRS-31TEJ',
order:status:'succeeded',
processing:datetime:'2024-07-10T13:10:44.000000Z',
processing:level:'S2MSI1C',
processing:version:'05.10',
product:type:'S2MSI1C',
s2:datastrip_id:'S2B_OPER_MSI_L1C_DS_2BPS_20240710T131044_S20240710T103819_N05.10',
s2:datatake_id:'GS2B_20240710T103629_038358_N05.10',
s2:datatake_type:'INS-NOBS',
s2:tile_id:'S2B_OPER_MSI_L1C_TL_2BPS_20240710T131044_A038358_T31TEJ_N05.10',
sat:absolute_orbit:38358,
sat:relative_orbit:8,
}
\n", + "
assets: (0)
\n", + "
geometry
thumbnail
\n", + "
\n", + "
" + ], + "text/plain": [ + "SearchResult([EOProduct(id=S2A_MSIL1C_20240708T105031_N0510_R051_T31TEJ_20240708T125024, provider=cop_dataspace),\n", + " EOProduct(id=S2B_MSIL1C_20240710T103629_N0510_R008_T31TEJ_20240710T131044, provider=cop_dataspace)])" + ] + }, + "execution_count": 18, + "metadata": {}, + "output_type": "execute_result" + } + ], + "source": [ + "next_page = deserialized_and_registered.next_page()\n", + "results_page_2 = next(next_page)\n", + "results_page_2" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "### `import_stac_items`\n", + "\n", + "[import_stac_items()](../../api_reference/core.rst#eodag.api.core.EODataAccessGateway.import_stac_items) will import STAC items from a list of URLs and convert them to a [SearchResult](../../api_reference/searchresult.rst#eodag.api.search_result.SearchResult).\n", + "\n", + "- Origin provider and download links will be set if item comes from an EODAG server (see [stac-fastapi-eodag](github.com/CS-SI/stac-fastapi-eodag)).\n", + "- If item comes from a known EODAG provider, result will be registered to it, ready to download and its metadata normalized.\n", + "- If item comes from an unknown provider, a generic STAC provider will be used." + ] + }, + { + "cell_type": "code", + "execution_count": 19, + "metadata": {}, + "outputs": [ + { + "data": { + "text/html": [ + "\n", + " \n", + " \n", + " \n", + "
\n", + " SearchResult (2)\n", + "
\n", + "
\n", + " 0 \n", + " EOProduct(id=S2B_27VWK_20240206_0_L1C, provider=earth_search)\n", + " \n", + " \n", + " \n", + "\n", + " \n", + " \n", + " \n", + " \n", + " \n", + "
\n", + " EOProduct\n", + "
\n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + "
provider:'earth_search',
collection:'S2_MSI_L1C',
properties["id"]:'S2B_27VWK_20240206_0_L1C',
\n", + "
properties: (33){\n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + "
constellation:'sentinel-2',
datetime:'2024-02-06T13:14:11.918000Z',
id:'S2B_27VWK_20240206_0_L1C',
instruments:['msi'\n", + " ],
platform:'sentinel-2b',
title:'S2B_27VWK_20240206_0_L1C',
earth_search:created:'2024-02-06T15:02:12.605Z',
earth_search:updated:'2024-02-06T15:02:12.605Z',
earthsearch:payload_id:'roda-sentinel2/workflow-sentinel2-to-stac/3a593207fb50a145677c300bf92b974f',
earthsearch:s3_path:'s3://earthsearch-data/sentinel-2-l1c/27/V/WK/2024/2/S2B_27VWK_20240206_0_L1C',
eo:cloud_cover:9.93604802923519,
eodag:download_link:'https://earth-search.aws.element84.com/v1/collections/sentinel-2-l1c/items/S2B_27VWK_20240206_0_L1C',
eodag:thumbnail:'s3://sentinel-s2-l1c/tiles/27/V/WK/2024/2/6/0/preview.jpg',
grid:code:'MGRS-27VWK',
mgrs:grid_square:'WK',
mgrs:latitude_band:'V',
mgrs:utm_zone:27,
order:status:'succeeded',
processing:software:{\n", + " 'sentinel2-to-stac': '0.1.1'\n", + " },
proj:code:'EPSG:32627',
s2:datastrip_id:'S2B_OPER_MSI_L1C_DS_2BPS_20240206T133903_S20240206T131359_N05.10',
s2:datatake_id:'GS2B_20240206T131259_036143_N05.10',
s2:datatake_type:'INS-NOBS',
s2:degraded_msi_data_percentage:0,
s2:generation_time:'2024-02-06T13:39:03.000000Z',
s2:granule_id:'S2B_OPER_MSI_L1C_TL_2BPS_20240206T133903_A036143_T27VWK_N05.10',
s2:processing_baseline:5.1,
s2:product_type:'S2MSI1C',
s2:product_uri:'S2B_MSIL1C_20240206T131259_N0510_R081_T27VWK_20240206T133903.SAFE',
s2:reflectance_conversion_factor:1.02982763156509,
s2:sequence:0,
view:sun_azimuth:175.230754104899,
view:sun_elevation:11.604167707198599,
}
\n", + "
assets: (17)\n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + "
\n", + "
\n", + " 'B01': \n", + " {\n", + " 'roles': '['data']', \n", + " 'type': 'image/jp2', \n", + " 'title': 'B01', \n", + " ...\n", + " }\n", + " \n", + " {\n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + "
href:'s3://sentinel-s2-l1c/tiles/27/V/WK/2024/2/6/0/B01.jp2',
type:'image/jp2',
title:'B01',
eo:bands:[{\n", + " 'name': 'coastal'\n", + " , \n", + " 'common_name': 'coastal'\n", + " , \n", + " 'description': 'Coastal aerosol (band 1)'\n", + " , \n", + " 'center_wavelength': 0.443\n", + " , \n", + " 'full_width_half_max': 0.027\n", + " }\n", + " ],
gsd:60,
proj:shape:[1830\n", + " , 1830\n", + " ],
proj:transform:[60\n", + " , 0\n", + " , 499980\n", + " , 0\n", + " , -60\n", + " , 7000020\n", + " ],
raster:bands:[{\n", + " 'nodata': 0\n", + " , \n", + " 'data_type': 'uint16'\n", + " , \n", + " 'bits_per_sample': 15\n", + " , \n", + " 'spatial_resolution': 60\n", + " , \n", + " 'scale': 0.0001\n", + " , \n", + " 'offset': -0.1\n", + " }\n", + " ],
roles:['data'\n", + " ],
}\n", + "
\n", + "
\n", + "
\n", + " 'B02': \n", + " {\n", + " 'roles': '['data']', \n", + " 'type': 'image/jp2', \n", + " 'title': 'B02', \n", + " ...\n", + " }\n", + " \n", + " {\n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + "
href:'s3://sentinel-s2-l1c/tiles/27/V/WK/2024/2/6/0/B02.jp2',
type:'image/jp2',
title:'B02',
eo:bands:[{\n", + " 'name': 'blue'\n", + " , \n", + " 'common_name': 'blue'\n", + " , \n", + " 'description': 'Blue (band 2)'\n", + " , \n", + " 'center_wavelength': 0.49\n", + " , \n", + " 'full_width_half_max': 0.098\n", + " }\n", + " ],
gsd:10,
proj:shape:[10980\n", + " , 10980\n", + " ],
proj:transform:[10\n", + " , 0\n", + " , 499980\n", + " , 0\n", + " , -10\n", + " , 7000020\n", + " ],
raster:bands:[{\n", + " 'nodata': 0\n", + " , \n", + " 'data_type': 'uint16'\n", + " , \n", + " 'bits_per_sample': 15\n", + " , \n", + " 'spatial_resolution': 10\n", + " , \n", + " 'scale': 0.0001\n", + " , \n", + " 'offset': -0.1\n", + " }\n", + " ],
roles:['data'\n", + " ],
}\n", + "
\n", + "
\n", + "
\n", + " 'B03': \n", + " {\n", + " 'roles': '['data']', \n", + " 'type': 'image/jp2', \n", + " 'title': 'B03', \n", + " ...\n", + " }\n", + " \n", + " {\n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + "
href:'s3://sentinel-s2-l1c/tiles/27/V/WK/2024/2/6/0/B03.jp2',
type:'image/jp2',
title:'B03',
eo:bands:[{\n", + " 'name': 'green'\n", + " , \n", + " 'common_name': 'green'\n", + " , \n", + " 'description': 'Green (band 3)'\n", + " , \n", + " 'center_wavelength': 0.56\n", + " , \n", + " 'full_width_half_max': 0.045\n", + " }\n", + " ],
gsd:10,
proj:shape:[10980\n", + " , 10980\n", + " ],
proj:transform:[10\n", + " , 0\n", + " , 499980\n", + " , 0\n", + " , -10\n", + " , 7000020\n", + " ],
raster:bands:[{\n", + " 'nodata': 0\n", + " , \n", + " 'data_type': 'uint16'\n", + " , \n", + " 'bits_per_sample': 15\n", + " , \n", + " 'spatial_resolution': 10\n", + " , \n", + " 'scale': 0.0001\n", + " , \n", + " 'offset': -0.1\n", + " }\n", + " ],
roles:['data'\n", + " ],
}\n", + "
\n", + "
\n", + "
\n", + " 'B04': \n", + " {\n", + " 'roles': '['data']', \n", + " 'type': 'image/jp2', \n", + " 'title': 'B04', \n", + " ...\n", + " }\n", + " \n", + " {\n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + "
href:'s3://sentinel-s2-l1c/tiles/27/V/WK/2024/2/6/0/B04.jp2',
type:'image/jp2',
title:'B04',
eo:bands:[{\n", + " 'name': 'red'\n", + " , \n", + " 'common_name': 'red'\n", + " , \n", + " 'description': 'Red (band 4)'\n", + " , \n", + " 'center_wavelength': 0.665\n", + " , \n", + " 'full_width_half_max': 0.038\n", + " }\n", + " ],
gsd:10,
proj:shape:[10980\n", + " , 10980\n", + " ],
proj:transform:[10\n", + " , 0\n", + " , 499980\n", + " , 0\n", + " , -10\n", + " , 7000020\n", + " ],
raster:bands:[{\n", + " 'nodata': 0\n", + " , \n", + " 'data_type': 'uint16'\n", + " , \n", + " 'bits_per_sample': 15\n", + " , \n", + " 'spatial_resolution': 10\n", + " , \n", + " 'scale': 0.0001\n", + " , \n", + " 'offset': -0.1\n", + " }\n", + " ],
roles:['data'\n", + " ],
}\n", + "
\n", + "
\n", + "
\n", + " 'B05': \n", + " {\n", + " 'roles': '['data']', \n", + " 'type': 'image/jp2', \n", + " 'title': 'B05', \n", + " ...\n", + " }\n", + " \n", + " {\n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + "
href:'s3://sentinel-s2-l1c/tiles/27/V/WK/2024/2/6/0/B05.jp2',
type:'image/jp2',
title:'B05',
eo:bands:[{\n", + " 'name': 'rededge1'\n", + " , \n", + " 'common_name': 'rededge'\n", + " , \n", + " 'description': 'Red edge 1 (band 5)'\n", + " , \n", + " 'center_wavelength': 0.704\n", + " , \n", + " 'full_width_half_max': 0.019\n", + " }\n", + " ],
gsd:20,
proj:shape:[5490\n", + " , 5490\n", + " ],
proj:transform:[20\n", + " , 0\n", + " , 499980\n", + " , 0\n", + " , -20\n", + " , 7000020\n", + " ],
raster:bands:[{\n", + " 'nodata': 0\n", + " , \n", + " 'data_type': 'uint16'\n", + " , \n", + " 'bits_per_sample': 15\n", + " , \n", + " 'spatial_resolution': 20\n", + " , \n", + " 'scale': 0.0001\n", + " , \n", + " 'offset': -0.1\n", + " }\n", + " ],
roles:['data'\n", + " ],
}\n", + "
\n", + "
\n", + "
\n", + " 'B06': \n", + " {\n", + " 'roles': '['data']', \n", + " 'type': 'image/jp2', \n", + " 'title': 'B06', \n", + " ...\n", + " }\n", + " \n", + " {\n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + "
href:'s3://sentinel-s2-l1c/tiles/27/V/WK/2024/2/6/0/B06.jp2',
type:'image/jp2',
title:'B06',
eo:bands:[{\n", + " 'name': 'rededge2'\n", + " , \n", + " 'common_name': 'rededge'\n", + " , \n", + " 'description': 'Red edge 2 (band 6)'\n", + " , \n", + " 'center_wavelength': 0.74\n", + " , \n", + " 'full_width_half_max': 0.018\n", + " }\n", + " ],
gsd:20,
proj:shape:[5490\n", + " , 5490\n", + " ],
proj:transform:[20\n", + " , 0\n", + " , 499980\n", + " , 0\n", + " , -20\n", + " , 7000020\n", + " ],
raster:bands:[{\n", + " 'nodata': 0\n", + " , \n", + " 'data_type': 'uint16'\n", + " , \n", + " 'bits_per_sample': 15\n", + " , \n", + " 'spatial_resolution': 20\n", + " , \n", + " 'scale': 0.0001\n", + " , \n", + " 'offset': -0.1\n", + " }\n", + " ],
roles:['data'\n", + " ],
}\n", + "
\n", + "
\n", + "
\n", + " 'B07': \n", + " {\n", + " 'roles': '['data']', \n", + " 'type': 'image/jp2', \n", + " 'title': 'B07', \n", + " ...\n", + " }\n", + " \n", + " {\n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + "
href:'s3://sentinel-s2-l1c/tiles/27/V/WK/2024/2/6/0/B07.jp2',
type:'image/jp2',
title:'B07',
eo:bands:[{\n", + " 'name': 'rededge3'\n", + " , \n", + " 'common_name': 'rededge'\n", + " , \n", + " 'description': 'Red edge 3 (band 7)'\n", + " , \n", + " 'center_wavelength': 0.783\n", + " , \n", + " 'full_width_half_max': 0.028\n", + " }\n", + " ],
gsd:20,
proj:shape:[5490\n", + " , 5490\n", + " ],
proj:transform:[20\n", + " , 0\n", + " , 499980\n", + " , 0\n", + " , -20\n", + " , 7000020\n", + " ],
raster:bands:[{\n", + " 'nodata': 0\n", + " , \n", + " 'data_type': 'uint16'\n", + " , \n", + " 'bits_per_sample': 15\n", + " , \n", + " 'spatial_resolution': 20\n", + " , \n", + " 'scale': 0.0001\n", + " , \n", + " 'offset': -0.1\n", + " }\n", + " ],
roles:['data'\n", + " ],
}\n", + "
\n", + "
\n", + "
\n", + " 'B08': \n", + " {\n", + " 'roles': '['data']', \n", + " 'type': 'image/jp2', \n", + " 'title': 'B08', \n", + " ...\n", + " }\n", + " \n", + " {\n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + "
href:'s3://sentinel-s2-l1c/tiles/27/V/WK/2024/2/6/0/B08.jp2',
type:'image/jp2',
title:'B08',
eo:bands:[{\n", + " 'name': 'nir'\n", + " , \n", + " 'common_name': 'nir'\n", + " , \n", + " 'description': 'NIR 1 (band 8)'\n", + " , \n", + " 'center_wavelength': 0.842\n", + " , \n", + " 'full_width_half_max': 0.145\n", + " }\n", + " ],
gsd:10,
proj:shape:[10980\n", + " , 10980\n", + " ],
proj:transform:[10\n", + " , 0\n", + " , 499980\n", + " , 0\n", + " , -10\n", + " , 7000020\n", + " ],
raster:bands:[{\n", + " 'nodata': 0\n", + " , \n", + " 'data_type': 'uint16'\n", + " , \n", + " 'bits_per_sample': 15\n", + " , \n", + " 'spatial_resolution': 10\n", + " , \n", + " 'scale': 0.0001\n", + " , \n", + " 'offset': -0.1\n", + " }\n", + " ],
roles:['data'\n", + " ],
}\n", + "
\n", + "
\n", + "
\n", + " 'B09': \n", + " {\n", + " 'roles': '['data']', \n", + " 'type': 'image/jp2', \n", + " 'title': 'B09', \n", + " ...\n", + " }\n", + " \n", + " {\n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + "
href:'s3://sentinel-s2-l1c/tiles/27/V/WK/2024/2/6/0/B09.jp2',
type:'image/jp2',
title:'B09',
eo:bands:[{\n", + " 'name': 'nir09'\n", + " , \n", + " 'common_name': 'nir09'\n", + " , \n", + " 'description': 'NIR 3 (band 9)'\n", + " , \n", + " 'center_wavelength': 0.945\n", + " , \n", + " 'full_width_half_max': 0.026\n", + " }\n", + " ],
gsd:60,
proj:shape:[1830\n", + " , 1830\n", + " ],
proj:transform:[60\n", + " , 0\n", + " , 499980\n", + " , 0\n", + " , -60\n", + " , 7000020\n", + " ],
raster:bands:[{\n", + " 'nodata': 0\n", + " , \n", + " 'data_type': 'uint16'\n", + " , \n", + " 'bits_per_sample': 15\n", + " , \n", + " 'spatial_resolution': 60\n", + " , \n", + " 'scale': 0.0001\n", + " , \n", + " 'offset': -0.1\n", + " }\n", + " ],
roles:['data'\n", + " ],
}\n", + "
\n", + "
\n", + "
\n", + " 'B10': \n", + " {\n", + " 'roles': '['data']', \n", + " 'type': 'image/jp2', \n", + " 'title': 'B10', \n", + " ...\n", + " }\n", + " \n", + " {\n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + "
href:'s3://sentinel-s2-l1c/tiles/27/V/WK/2024/2/6/0/B10.jp2',
type:'image/jp2',
title:'B10',
eo:bands:[{\n", + " 'name': 'cirrus'\n", + " , \n", + " 'common_name': 'cirrus'\n", + " , \n", + " 'description': 'Cirrus (band 10)'\n", + " , \n", + " 'center_wavelength': 1.3735\n", + " , \n", + " 'full_width_half_max': 0.075\n", + " }\n", + " ],
gsd:60,
proj:shape:[1830\n", + " , 1830\n", + " ],
proj:transform:[60\n", + " , 0\n", + " , 499980\n", + " , 0\n", + " , -60\n", + " , 7000020\n", + " ],
raster:bands:[{\n", + " 'nodata': 0\n", + " , \n", + " 'data_type': 'uint16'\n", + " , \n", + " 'bits_per_sample': 15\n", + " , \n", + " 'spatial_resolution': 60\n", + " , \n", + " 'scale': 0.0001\n", + " , \n", + " 'offset': -0.1\n", + " }\n", + " ],
roles:['data'\n", + " ],
}\n", + "
\n", + "
\n", + "
\n", + " 'B11': \n", + " {\n", + " 'roles': '['data']', \n", + " 'type': 'image/jp2', \n", + " 'title': 'B11', \n", + " ...\n", + " }\n", + " \n", + " {\n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + "
href:'s3://sentinel-s2-l1c/tiles/27/V/WK/2024/2/6/0/B11.jp2',
type:'image/jp2',
title:'B11',
eo:bands:[{\n", + " 'name': 'swir16'\n", + " , \n", + " 'common_name': 'swir16'\n", + " , \n", + " 'description': 'SWIR 1 (band 11)'\n", + " , \n", + " 'center_wavelength': 1.61\n", + " , \n", + " 'full_width_half_max': 0.143\n", + " }\n", + " ],
gsd:20,
proj:shape:[5490\n", + " , 5490\n", + " ],
proj:transform:[20\n", + " , 0\n", + " , 499980\n", + " , 0\n", + " , -20\n", + " , 7000020\n", + " ],
raster:bands:[{\n", + " 'nodata': 0\n", + " , \n", + " 'data_type': 'uint16'\n", + " , \n", + " 'bits_per_sample': 15\n", + " , \n", + " 'spatial_resolution': 20\n", + " , \n", + " 'scale': 0.0001\n", + " , \n", + " 'offset': -0.1\n", + " }\n", + " ],
roles:['data'\n", + " ],
}\n", + "
\n", + "
\n", + "
\n", + " 'B12': \n", + " {\n", + " 'roles': '['data']', \n", + " 'type': 'image/jp2', \n", + " 'title': 'B12', \n", + " ...\n", + " }\n", + " \n", + " {\n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + "
href:'s3://sentinel-s2-l1c/tiles/27/V/WK/2024/2/6/0/B12.jp2',
type:'image/jp2',
title:'B12',
eo:bands:[{\n", + " 'name': 'swir22'\n", + " , \n", + " 'common_name': 'swir22'\n", + " , \n", + " 'description': 'SWIR 2 (band 12)'\n", + " , \n", + " 'center_wavelength': 2.19\n", + " , \n", + " 'full_width_half_max': 0.242\n", + " }\n", + " ],
gsd:20,
proj:shape:[5490\n", + " , 5490\n", + " ],
proj:transform:[20\n", + " , 0\n", + " , 499980\n", + " , 0\n", + " , -20\n", + " , 7000020\n", + " ],
raster:bands:[{\n", + " 'nodata': 0\n", + " , \n", + " 'data_type': 'uint16'\n", + " , \n", + " 'bits_per_sample': 15\n", + " , \n", + " 'spatial_resolution': 20\n", + " , \n", + " 'scale': 0.0001\n", + " , \n", + " 'offset': -0.1\n", + " }\n", + " ],
roles:['data'\n", + " ],
}\n", + "
\n", + "
\n", + "
\n", + " 'B8A': \n", + " {\n", + " 'roles': '['data']', \n", + " 'type': 'image/jp2', \n", + " 'title': 'B8A', \n", + " ...\n", + " }\n", + " \n", + " {\n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + "
href:'s3://sentinel-s2-l1c/tiles/27/V/WK/2024/2/6/0/B8A.jp2',
type:'image/jp2',
title:'B8A',
eo:bands:[{\n", + " 'name': 'nir08'\n", + " , \n", + " 'common_name': 'nir08'\n", + " , \n", + " 'description': 'NIR 2 (band 8A)'\n", + " , \n", + " 'center_wavelength': 0.865\n", + " , \n", + " 'full_width_half_max': 0.033\n", + " }\n", + " ],
gsd:20,
proj:shape:[5490\n", + " , 5490\n", + " ],
proj:transform:[20\n", + " , 0\n", + " , 499980\n", + " , 0\n", + " , -20\n", + " , 7000020\n", + " ],
raster:bands:[{\n", + " 'nodata': 0\n", + " , \n", + " 'data_type': 'uint16'\n", + " , \n", + " 'bits_per_sample': 15\n", + " , \n", + " 'spatial_resolution': 20\n", + " , \n", + " 'scale': 0.0001\n", + " , \n", + " 'offset': -0.1\n", + " }\n", + " ],
roles:['data'\n", + " ],
}\n", + "
\n", + "
\n", + "
\n", + " 'TCI': \n", + " {\n", + " 'roles': '['visual']', \n", + " 'type': 'image/jp2', \n", + " 'title': 'TCI', \n", + " ...\n", + " }\n", + " \n", + " {\n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + "
href:'s3://sentinel-s2-l1c/tiles/27/V/WK/2024/2/6/0/TCI.jp2',
type:'image/jp2',
title:'TCI',
eo:bands:[{\n", + " 'name': 'red'\n", + " , \n", + " 'common_name': 'red'\n", + " , \n", + " 'description': 'Red (band 4)'\n", + " , \n", + " 'center_wavelength': 0.665\n", + " , \n", + " 'full_width_half_max': 0.038\n", + " }\n", + " ,
{\n", + " 'name': 'green'\n", + " , \n", + " 'common_name': 'green'\n", + " , \n", + " 'description': 'Green (band 3)'\n", + " , \n", + " 'center_wavelength': 0.56\n", + " , \n", + " 'full_width_half_max': 0.045\n", + " }\n", + " ,
{\n", + " 'name': 'blue'\n", + " , \n", + " 'common_name': 'blue'\n", + " , \n", + " 'description': 'Blue (band 2)'\n", + " , \n", + " 'center_wavelength': 0.49\n", + " , \n", + " 'full_width_half_max': 0.098\n", + " }\n", + " ],
proj:shape:[10980\n", + " , 10980\n", + " ],
proj:transform:[10\n", + " , 0\n", + " , 499980\n", + " , 0\n", + " , -10\n", + " , 7000020\n", + " ],
roles:['visual'\n", + " ],
}\n", + "
\n", + "
\n", + "
\n", + " 'metadata.xml': \n", + " {\n", + " 'roles': '['metadata']', \n", + " 'type': 'application/xml', \n", + " 'title': 'metadata.xml', \n", + " ...\n", + " }\n", + " \n", + " {\n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + "
href:'s3://sentinel-s2-l1c/tiles/27/V/WK/2024/2/6/0/metadata.xml',
type:'application/xml',
roles:['metadata'\n", + " ],
title:'metadata.xml',
}\n", + "
\n", + "
\n", + "
\n", + " 'preview.jpg': \n", + " {\n", + " 'roles': '['auxiliary']', \n", + " 'type': 'image/jpeg', \n", + " 'title': 'preview.jpg', \n", + " ...\n", + " }\n", + " \n", + " {\n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + "
href:'s3://sentinel-s2-l1c/tiles/27/V/WK/2024/2/6/0/preview.jpg',
type:'image/jpeg',
title:'preview.jpg',
roles:['auxiliary'\n", + " ],
}\n", + "
\n", + "
\n", + "
\n", + " 'tileInfo.json': \n", + " {\n", + " 'roles': '['metadata']', \n", + " 'type': 'application/json', \n", + " 'title': 'tileInfo.json', \n", + " ...\n", + " }\n", + " \n", + " {\n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + "
href:'s3://sentinel-s2-l1c/tiles/27/V/WK/2024/2/6/0/tileInfo.json',
type:'application/json',
roles:['metadata'\n", + " ],
title:'tileInfo.json',
}\n", + "
\n", + "
\n", + "
geometry
\n", + "
\n", + "
\n", + "
\n", + " 1 \n", + " EOProduct(id=S2A_MSIL1C_20250510T084731_N0511_R107_T36TUR_20250510T094847, provider=generic_stac_provider)\n", + " \n", + " \n", + " \n", + "\n", + " \n", + " \n", + " \n", + " \n", + " \n", + "
\n", + " EOProduct\n", + "
\n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + "
provider:'generic_stac_provider',
collection:'sentinel-2-l1c',
properties["id"]:'S2A_MSIL1C_20250510T084731_N0511_R107_T36TUR_20250510T094847',
\n", + "
properties: (25){\n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + "
constellation:'Sentinel 2',
datetime:'2025-05-10T09:48:47Z',
id:'S2A_MSIL1C_20250510T084731_N0511_R107_T36TUR_20250510T094847',
instruments:['msi'\n", + " ],
platform:'Sentinel-2A',
title:'S2A_MSIL1C_20250510T084731_N0511_R107_T36TUR_20250510T094847',
eo:cloud_cover:99.495267102631,
eodag:download_link:'https://stac.sage.uvt.ro/collections/sentinel-2-l1c/items/S2A_MSIL1C_20250510T084731_N0511_R107_T36TUR_20250510T094847',
order:status:'succeeded',
proj:code:'EPSG:32636',
s2:datastrip_id:'S2A_OPER_MSI_L1C_DS_2APS_20250510T094847_S20250510T085645_N05.11',
s2:datatake_id:'GS2A_20250510T084731_051613_N05.11',
s2:datatake_type:'INS-NOBS',
s2:degraded_msi_data_percentage:0.0,
s2:generation_time:'2025-05-10T09:48:47+00:00',
s2:granule_id:'S2A_OPER_MSI_L1C_TL_2APS_20250510T094847_A051613_T36TUR_N05.11',
s2:mean_solar_azimuth:153.62398533626,
s2:mean_solar_zenith:29.9947762743748,
s2:mgrs_tile:'T36TUR',
s2:processing_baseline:5.11,
s2:product_type:'S2MSI1C',
s2:product_uri:'S2A_MSIL1C_20250510T084731_N0511_R107_T36TUR_20250510T094847.SAFE',
s2:snow_ice_percentage:0.0,
sat:orbit_state:'descending',
sat:relative_orbit:107,
}
\n", + "
assets: (22)\n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + "
\n", + "
\n", + " 'B01': \n", + " {\n", + " 'roles': '['data']', \n", + " 'type': 'image/tiff; application=geotiff; profile=cloud-optimized', \n", + " 'title': 'B01', \n", + " ...\n", + " }\n", + " \n", + " {\n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + "
href:'https://storage.info.uvt.ro/eodata/Sentinel-2/2025/5/10/T36TUR/S2A_MSIL1C_20250510T084731_N0511_R107_T36TUR_20250510T094847.SAFE/GRANULE/L1C_T36TUR_A051613_20250510T085645/IMG_DATA/T36TUR_20250510T084731_B01.tif',
type:'image/tiff; application=geotiff; profile=cloud-optimized',
title:'B01',
eo:bands:[{\n", + " 'name': 'B01'\n", + " , \n", + " 'common_name': 'coastal'\n", + " , \n", + " 'description': 'Band 1 - Coastal aerosol'\n", + " , \n", + " 'center_wavelength': 0.443\n", + " , \n", + " 'full_width_half_max': 0.027\n", + " }\n", + " ],
proj:bbox:[300000.0\n", + " , 4990200.0\n", + " , 409800.0\n", + " , 5100000.0\n", + " ],
proj:shape:[1830\n", + " , 1830\n", + " ],
proj:transform:[60.0\n", + " , 0.0\n", + " , 300000.0\n", + " , 0.0\n", + " , -60.0\n", + " , 5100000.0\n", + " , 0.0\n", + " , 0.0\n", + " , 1.0\n", + " ],
proj:code:'EPSG:32636',
roles:['data'\n", + " ],
}\n", + "
\n", + "
\n", + "
\n", + " 'B02': \n", + " {\n", + " 'roles': '['data']', \n", + " 'type': 'image/tiff; application=geotiff; profile=cloud-optimized', \n", + " 'title': 'B02', \n", + " ...\n", + " }\n", + " \n", + " {\n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + "
href:'https://storage.info.uvt.ro/eodata/Sentinel-2/2025/5/10/T36TUR/S2A_MSIL1C_20250510T084731_N0511_R107_T36TUR_20250510T094847.SAFE/GRANULE/L1C_T36TUR_A051613_20250510T085645/IMG_DATA/T36TUR_20250510T084731_B02.tif',
type:'image/tiff; application=geotiff; profile=cloud-optimized',
title:'B02',
eo:bands:[{\n", + " 'name': 'B02'\n", + " , \n", + " 'common_name': 'blue'\n", + " , \n", + " 'description': 'Band 2 - Blue'\n", + " , \n", + " 'center_wavelength': 0.49\n", + " , \n", + " 'full_width_half_max': 0.098\n", + " }\n", + " ],
proj:bbox:[300000.0\n", + " , 4990200.0\n", + " , 409800.0\n", + " , 5100000.0\n", + " ],
proj:shape:[10980\n", + " , 10980\n", + " ],
proj:transform:[10.0\n", + " , 0.0\n", + " , 300000.0\n", + " , 0.0\n", + " , -10.0\n", + " , 5100000.0\n", + " , 0.0\n", + " , 0.0\n", + " , 1.0\n", + " ],
proj:code:'EPSG:32636',
roles:['data'\n", + " ],
}\n", + "
\n", + "
\n", + "
\n", + " 'B03': \n", + " {\n", + " 'roles': '['data']', \n", + " 'type': 'image/tiff; application=geotiff; profile=cloud-optimized', \n", + " 'title': 'B03', \n", + " ...\n", + " }\n", + " \n", + " {\n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + "
href:'https://storage.info.uvt.ro/eodata/Sentinel-2/2025/5/10/T36TUR/S2A_MSIL1C_20250510T084731_N0511_R107_T36TUR_20250510T094847.SAFE/GRANULE/L1C_T36TUR_A051613_20250510T085645/IMG_DATA/T36TUR_20250510T084731_B03.tif',
type:'image/tiff; application=geotiff; profile=cloud-optimized',
title:'B03',
eo:bands:[{\n", + " 'name': 'B03'\n", + " , \n", + " 'common_name': 'green'\n", + " , \n", + " 'description': 'Band 3 - Green'\n", + " , \n", + " 'center_wavelength': 0.56\n", + " , \n", + " 'full_width_half_max': 0.045\n", + " }\n", + " ],
proj:bbox:[300000.0\n", + " , 4990200.0\n", + " , 409800.0\n", + " , 5100000.0\n", + " ],
proj:shape:[10980\n", + " , 10980\n", + " ],
proj:transform:[10.0\n", + " , 0.0\n", + " , 300000.0\n", + " , 0.0\n", + " , -10.0\n", + " , 5100000.0\n", + " , 0.0\n", + " , 0.0\n", + " , 1.0\n", + " ],
proj:code:'EPSG:32636',
roles:['data'\n", + " ],
}\n", + "
\n", + "
\n", + "
\n", + " 'B04': \n", + " {\n", + " 'roles': '['data']', \n", + " 'type': 'image/tiff; application=geotiff; profile=cloud-optimized', \n", + " 'title': 'B04', \n", + " ...\n", + " }\n", + " \n", + " {\n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + "
href:'https://storage.info.uvt.ro/eodata/Sentinel-2/2025/5/10/T36TUR/S2A_MSIL1C_20250510T084731_N0511_R107_T36TUR_20250510T094847.SAFE/GRANULE/L1C_T36TUR_A051613_20250510T085645/IMG_DATA/T36TUR_20250510T084731_B04.tif',
type:'image/tiff; application=geotiff; profile=cloud-optimized',
title:'B04',
eo:bands:[{\n", + " 'name': 'B04'\n", + " , \n", + " 'common_name': 'red'\n", + " , \n", + " 'description': 'Band 4 - Red'\n", + " , \n", + " 'center_wavelength': 0.665\n", + " , \n", + " 'full_width_half_max': 0.038\n", + " }\n", + " ],
proj:bbox:[300000.0\n", + " , 4990200.0\n", + " , 409800.0\n", + " , 5100000.0\n", + " ],
proj:shape:[10980\n", + " , 10980\n", + " ],
proj:transform:[10.0\n", + " , 0.0\n", + " , 300000.0\n", + " , 0.0\n", + " , -10.0\n", + " , 5100000.0\n", + " , 0.0\n", + " , 0.0\n", + " , 1.0\n", + " ],
proj:code:'EPSG:32636',
roles:['data'\n", + " ],
}\n", + "
\n", + "
\n", + "
\n", + " 'B05': \n", + " {\n", + " 'roles': '['data']', \n", + " 'type': 'image/tiff; application=geotiff; profile=cloud-optimized', \n", + " 'title': 'B05', \n", + " ...\n", + " }\n", + " \n", + " {\n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + "
href:'https://storage.info.uvt.ro/eodata/Sentinel-2/2025/5/10/T36TUR/S2A_MSIL1C_20250510T084731_N0511_R107_T36TUR_20250510T094847.SAFE/GRANULE/L1C_T36TUR_A051613_20250510T085645/IMG_DATA/T36TUR_20250510T084731_B05.tif',
type:'image/tiff; application=geotiff; profile=cloud-optimized',
title:'B05',
eo:bands:[{\n", + " 'name': 'B05'\n", + " , \n", + " 'common_name': 'rededge'\n", + " , \n", + " 'description': 'Band 5 - Vegetation red edge 1'\n", + " , \n", + " 'center_wavelength': 0.704\n", + " , \n", + " 'full_width_half_max': 0.019\n", + " }\n", + " ],
proj:bbox:[300000.0\n", + " , 4990200.0\n", + " , 409800.0\n", + " , 5100000.0\n", + " ],
proj:shape:[5490\n", + " , 5490\n", + " ],
proj:transform:[20.0\n", + " , 0.0\n", + " , 300000.0\n", + " , 0.0\n", + " , -20.0\n", + " , 5100000.0\n", + " , 0.0\n", + " , 0.0\n", + " , 1.0\n", + " ],
proj:code:'EPSG:32636',
roles:['data'\n", + " ],
}\n", + "
\n", + "
\n", + "
\n", + " 'B06': \n", + " {\n", + " 'roles': '['data']', \n", + " 'type': 'image/tiff; application=geotiff; profile=cloud-optimized', \n", + " 'title': 'B06', \n", + " ...\n", + " }\n", + " \n", + " {\n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + "
href:'https://storage.info.uvt.ro/eodata/Sentinel-2/2025/5/10/T36TUR/S2A_MSIL1C_20250510T084731_N0511_R107_T36TUR_20250510T094847.SAFE/GRANULE/L1C_T36TUR_A051613_20250510T085645/IMG_DATA/T36TUR_20250510T084731_B06.tif',
type:'image/tiff; application=geotiff; profile=cloud-optimized',
title:'B06',
eo:bands:[{\n", + " 'name': 'B06'\n", + " , \n", + " 'common_name': 'rededge'\n", + " , \n", + " 'description': 'Band 6 - Vegetation red edge 2'\n", + " , \n", + " 'center_wavelength': 0.74\n", + " , \n", + " 'full_width_half_max': 0.018\n", + " }\n", + " ],
proj:bbox:[300000.0\n", + " , 4990200.0\n", + " , 409800.0\n", + " , 5100000.0\n", + " ],
proj:shape:[5490\n", + " , 5490\n", + " ],
proj:transform:[20.0\n", + " , 0.0\n", + " , 300000.0\n", + " , 0.0\n", + " , -20.0\n", + " , 5100000.0\n", + " , 0.0\n", + " , 0.0\n", + " , 1.0\n", + " ],
proj:code:'EPSG:32636',
roles:['data'\n", + " ],
}\n", + "
\n", + "
\n", + "
\n", + " 'B07': \n", + " {\n", + " 'roles': '['data']', \n", + " 'type': 'image/tiff; application=geotiff; profile=cloud-optimized', \n", + " 'title': 'B07', \n", + " ...\n", + " }\n", + " \n", + " {\n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + "
href:'https://storage.info.uvt.ro/eodata/Sentinel-2/2025/5/10/T36TUR/S2A_MSIL1C_20250510T084731_N0511_R107_T36TUR_20250510T094847.SAFE/GRANULE/L1C_T36TUR_A051613_20250510T085645/IMG_DATA/T36TUR_20250510T084731_B07.tif',
type:'image/tiff; application=geotiff; profile=cloud-optimized',
title:'B07',
eo:bands:[{\n", + " 'name': 'B07'\n", + " , \n", + " 'common_name': 'rededge'\n", + " , \n", + " 'description': 'Band 7 - Vegetation red edge 3'\n", + " , \n", + " 'center_wavelength': 0.783\n", + " , \n", + " 'full_width_half_max': 0.028\n", + " }\n", + " ],
proj:bbox:[300000.0\n", + " , 4990200.0\n", + " , 409800.0\n", + " , 5100000.0\n", + " ],
proj:shape:[5490\n", + " , 5490\n", + " ],
proj:transform:[20.0\n", + " , 0.0\n", + " , 300000.0\n", + " , 0.0\n", + " , -20.0\n", + " , 5100000.0\n", + " , 0.0\n", + " , 0.0\n", + " , 1.0\n", + " ],
proj:code:'EPSG:32636',
roles:['data'\n", + " ],
}\n", + "
\n", + "
\n", + "
\n", + " 'B08': \n", + " {\n", + " 'roles': '['data']', \n", + " 'type': 'image/tiff; application=geotiff; profile=cloud-optimized', \n", + " 'title': 'B08', \n", + " ...\n", + " }\n", + " \n", + " {\n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + "
href:'https://storage.info.uvt.ro/eodata/Sentinel-2/2025/5/10/T36TUR/S2A_MSIL1C_20250510T084731_N0511_R107_T36TUR_20250510T094847.SAFE/GRANULE/L1C_T36TUR_A051613_20250510T085645/IMG_DATA/T36TUR_20250510T084731_B08.tif',
type:'image/tiff; application=geotiff; profile=cloud-optimized',
title:'B08',
eo:bands:[{\n", + " 'name': 'B08'\n", + " , \n", + " 'common_name': 'nir'\n", + " , \n", + " 'description': 'Band 8 - NIR'\n", + " , \n", + " 'center_wavelength': 0.842\n", + " , \n", + " 'full_width_half_max': 0.145\n", + " }\n", + " ],
proj:bbox:[300000.0\n", + " , 4990200.0\n", + " , 409800.0\n", + " , 5100000.0\n", + " ],
proj:shape:[10980\n", + " , 10980\n", + " ],
proj:transform:[10.0\n", + " , 0.0\n", + " , 300000.0\n", + " , 0.0\n", + " , -10.0\n", + " , 5100000.0\n", + " , 0.0\n", + " , 0.0\n", + " , 1.0\n", + " ],
proj:code:'EPSG:32636',
roles:['data'\n", + " ],
}\n", + "
\n", + "
\n", + "
\n", + " 'B09': \n", + " {\n", + " 'roles': '['data']', \n", + " 'type': 'image/tiff; application=geotiff; profile=cloud-optimized', \n", + " 'title': 'B09', \n", + " ...\n", + " }\n", + " \n", + " {\n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + "
href:'https://storage.info.uvt.ro/eodata/Sentinel-2/2025/5/10/T36TUR/S2A_MSIL1C_20250510T084731_N0511_R107_T36TUR_20250510T094847.SAFE/GRANULE/L1C_T36TUR_A051613_20250510T085645/IMG_DATA/T36TUR_20250510T084731_B09.tif',
type:'image/tiff; application=geotiff; profile=cloud-optimized',
title:'B09',
eo:bands:[{\n", + " 'name': 'B09'\n", + " , \n", + " 'description': 'Band 9 - Water vapor'\n", + " , \n", + " 'center_wavelength': 0.945\n", + " , \n", + " 'full_width_half_max': 0.026\n", + " }\n", + " ],
proj:bbox:[300000.0\n", + " , 4990200.0\n", + " , 409800.0\n", + " , 5100000.0\n", + " ],
proj:shape:[1830\n", + " , 1830\n", + " ],
proj:transform:[60.0\n", + " , 0.0\n", + " , 300000.0\n", + " , 0.0\n", + " , -60.0\n", + " , 5100000.0\n", + " , 0.0\n", + " , 0.0\n", + " , 1.0\n", + " ],
proj:code:'EPSG:32636',
roles:['data'\n", + " ],
}\n", + "
\n", + "
\n", + "
\n", + " 'B10': \n", + " {\n", + " 'roles': '['data']', \n", + " 'type': 'image/tiff; application=geotiff; profile=cloud-optimized', \n", + " 'title': 'B10', \n", + " ...\n", + " }\n", + " \n", + " {\n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + "
href:'https://storage.info.uvt.ro/eodata/Sentinel-2/2025/5/10/T36TUR/S2A_MSIL1C_20250510T084731_N0511_R107_T36TUR_20250510T094847.SAFE/GRANULE/L1C_T36TUR_A051613_20250510T085645/IMG_DATA/T36TUR_20250510T084731_B10.tif',
type:'image/tiff; application=geotiff; profile=cloud-optimized',
title:'B10',
eo:bands:[{\n", + " 'name': 'B10'\n", + " , \n", + " 'common_name': 'cirrus'\n", + " , \n", + " 'description': 'Band 11 - SWIR (1.3)'\n", + " , \n", + " 'center_wavelength': 1.375\n", + " , \n", + " 'full_width_half_max': 0.075\n", + " }\n", + " ],
proj:bbox:[300000.0\n", + " , 4990200.0\n", + " , 409800.0\n", + " , 5100000.0\n", + " ],
proj:shape:[1830\n", + " , 1830\n", + " ],
proj:transform:[60.0\n", + " , 0.0\n", + " , 300000.0\n", + " , 0.0\n", + " , -60.0\n", + " , 5100000.0\n", + " , 0.0\n", + " , 0.0\n", + " , 1.0\n", + " ],
proj:code:'EPSG:32636',
roles:['data'\n", + " ],
}\n", + "
\n", + "
\n", + "
\n", + " 'B11': \n", + " {\n", + " 'roles': '['data']', \n", + " 'type': 'image/tiff; application=geotiff; profile=cloud-optimized', \n", + " 'title': 'B11', \n", + " ...\n", + " }\n", + " \n", + " {\n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + "
href:'https://storage.info.uvt.ro/eodata/Sentinel-2/2025/5/10/T36TUR/S2A_MSIL1C_20250510T084731_N0511_R107_T36TUR_20250510T094847.SAFE/GRANULE/L1C_T36TUR_A051613_20250510T085645/IMG_DATA/T36TUR_20250510T084731_B11.tif',
type:'image/tiff; application=geotiff; profile=cloud-optimized',
title:'B11',
eo:bands:[{\n", + " 'name': 'B11'\n", + " , \n", + " 'common_name': 'swir16'\n", + " , \n", + " 'description': 'Band 11 - SWIR (1.6)'\n", + " , \n", + " 'center_wavelength': 1.61\n", + " , \n", + " 'full_width_half_max': 0.143\n", + " }\n", + " ],
proj:bbox:[300000.0\n", + " , 4990200.0\n", + " , 409800.0\n", + " , 5100000.0\n", + " ],
proj:shape:[5490\n", + " , 5490\n", + " ],
proj:transform:[20.0\n", + " , 0.0\n", + " , 300000.0\n", + " , 0.0\n", + " , -20.0\n", + " , 5100000.0\n", + " , 0.0\n", + " , 0.0\n", + " , 1.0\n", + " ],
proj:code:'EPSG:32636',
roles:['data'\n", + " ],
}\n", + "
\n", + "
\n", + "
\n", + " 'B12': \n", + " {\n", + " 'roles': '['data']', \n", + " 'type': 'image/tiff; application=geotiff; profile=cloud-optimized', \n", + " 'title': 'B12', \n", + " ...\n", + " }\n", + " \n", + " {\n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + "
href:'https://storage.info.uvt.ro/eodata/Sentinel-2/2025/5/10/T36TUR/S2A_MSIL1C_20250510T084731_N0511_R107_T36TUR_20250510T094847.SAFE/GRANULE/L1C_T36TUR_A051613_20250510T085645/IMG_DATA/T36TUR_20250510T084731_B12.tif',
type:'image/tiff; application=geotiff; profile=cloud-optimized',
title:'B12',
eo:bands:[{\n", + " 'name': 'B12'\n", + " , \n", + " 'common_name': 'swir22'\n", + " , \n", + " 'description': 'Band 12 - SWIR (2.2)'\n", + " , \n", + " 'center_wavelength': 2.19\n", + " , \n", + " 'full_width_half_max': 0.242\n", + " }\n", + " ],
proj:bbox:[300000.0\n", + " , 4990200.0\n", + " , 409800.0\n", + " , 5100000.0\n", + " ],
proj:shape:[5490\n", + " , 5490\n", + " ],
proj:transform:[20.0\n", + " , 0.0\n", + " , 300000.0\n", + " , 0.0\n", + " , -20.0\n", + " , 5100000.0\n", + " , 0.0\n", + " , 0.0\n", + " , 1.0\n", + " ],
proj:code:'EPSG:32636',
roles:['data'\n", + " ],
}\n", + "
\n", + "
\n", + "
\n", + " 'B8A': \n", + " {\n", + " 'roles': '['data']', \n", + " 'type': 'image/tiff; application=geotiff; profile=cloud-optimized', \n", + " 'title': 'B8A', \n", + " ...\n", + " }\n", + " \n", + " {\n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + "
href:'https://storage.info.uvt.ro/eodata/Sentinel-2/2025/5/10/T36TUR/S2A_MSIL1C_20250510T084731_N0511_R107_T36TUR_20250510T094847.SAFE/GRANULE/L1C_T36TUR_A051613_20250510T085645/IMG_DATA/T36TUR_20250510T084731_B8A.tif',
type:'image/tiff; application=geotiff; profile=cloud-optimized',
title:'B8A',
eo:bands:[{\n", + " 'name': 'B8A'\n", + " , \n", + " 'common_name': 'rededge'\n", + " , \n", + " 'description': 'Band 8A - Vegetation red edge 4'\n", + " , \n", + " 'center_wavelength': 0.865\n", + " , \n", + " 'full_width_half_max': 0.033\n", + " }\n", + " ],
proj:bbox:[300000.0\n", + " , 4990200.0\n", + " , 409800.0\n", + " , 5100000.0\n", + " ],
proj:shape:[5490\n", + " , 5490\n", + " ],
proj:transform:[20.0\n", + " , 0.0\n", + " , 300000.0\n", + " , 0.0\n", + " , -20.0\n", + " , 5100000.0\n", + " , 0.0\n", + " , 0.0\n", + " , 1.0\n", + " ],
proj:code:'EPSG:32636',
roles:['data'\n", + " ],
}\n", + "
\n", + "
\n", + "
\n", + " 'CLDFMASK': \n", + " {\n", + " 'roles': '['data']', \n", + " 'type': 'image/tiff; application=geotiff; profile=cloud-optimized', \n", + " 'title': 'CLDFMASK', \n", + " ...\n", + " }\n", + " \n", + " {\n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + "
href:'https://storage.info.uvt.ro/eodata/Sentinel-2/2025/5/10/T36TUR/S2A_MSIL1C_20250510T084731_N0511_R107_T36TUR_20250510T094847.SAFE/GRANULE/L1C_T36TUR_A051613_20250510T085645/IMG_DATA/T36TUR_20250510T084731_CLDFMASK.tif',
type:'image/tiff; application=geotiff; profile=cloud-optimized',
title:'CLDFMASK',
proj:bbox:[300000.0\n", + " , 4990200.0\n", + " , 409800.0\n", + " , 5100000.0\n", + " ],
proj:shape:[5490\n", + " , 5490\n", + " ],
proj:transform:[20.0\n", + " , 0.0\n", + " , 300000.0\n", + " , 0.0\n", + " , -20.0\n", + " , 5100000.0\n", + " , 0.0\n", + " , 0.0\n", + " , 1.0\n", + " ],
proj:code:'EPSG:32636',
roles:['data'\n", + " ],
}\n", + "
\n", + "
\n", + "
\n", + " 'INSPIRE.xml': \n", + " {\n", + " 'roles': '['metadata']', \n", + " 'type': 'application/xml', \n", + " 'title': 'INSPIRE.xml', \n", + " ...\n", + " }\n", + " \n", + " {\n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + "
href:'https://storage.info.uvt.ro/eodata/Sentinel-2/2025/5/10/T36TUR/S2A_MSIL1C_20250510T084731_N0511_R107_T36TUR_20250510T094847.SAFE/INSPIRE.xml',
type:'application/xml',
title:'INSPIRE.xml',
roles:['metadata'\n", + " ],
}\n", + "
\n", + "
\n", + "
\n", + " 'MTD_DS.xml': \n", + " {\n", + " 'roles': '['metadata']', \n", + " 'type': 'application/xml', \n", + " 'title': 'MTD_DS.xml', \n", + " ...\n", + " }\n", + " \n", + " {\n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + "
href:'https://storage.info.uvt.ro/eodata/Sentinel-2/2025/5/10/T36TUR/S2A_MSIL1C_20250510T084731_N0511_R107_T36TUR_20250510T094847.SAFE/DATASTRIP/DS_2APS_20250510T094847_S20250510T085645/MTD_DS.xml',
type:'application/xml',
title:'MTD_DS.xml',
roles:['metadata'\n", + " ],
}\n", + "
\n", + "
\n", + "
\n", + " 'MTD_MSIL1C.xml': \n", + " {\n", + " 'roles': '['metadata']', \n", + " 'type': 'application/xml', \n", + " 'title': 'MTD_MSIL1C.xml', \n", + " ...\n", + " }\n", + " \n", + " {\n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + "
href:'https://storage.info.uvt.ro/eodata/Sentinel-2/2025/5/10/T36TUR/S2A_MSIL1C_20250510T084731_N0511_R107_T36TUR_20250510T094847.SAFE/MTD_MSIL1C.xml',
type:'application/xml',
title:'MTD_MSIL1C.xml',
roles:['metadata'\n", + " ],
}\n", + "
\n", + "
\n", + "
\n", + " 'MTD_TL.xml': \n", + " {\n", + " 'roles': '['metadata']', \n", + " 'type': 'application/xml', \n", + " 'title': 'MTD_TL.xml', \n", + " ...\n", + " }\n", + " \n", + " {\n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + "
href:'https://storage.info.uvt.ro/eodata/Sentinel-2/2025/5/10/T36TUR/S2A_MSIL1C_20250510T084731_N0511_R107_T36TUR_20250510T094847.SAFE/GRANULE/L1C_T36TUR_A051613_20250510T085645/MTD_TL.xml',
type:'application/xml',
title:'MTD_TL.xml',
roles:['metadata'\n", + " ],
}\n", + "
\n", + "
\n", + "
\n", + " 'PVI': \n", + " {\n", + " 'roles': '['data']', \n", + " 'type': 'image/tiff; application=geotiff; profile=cloud-optimized', \n", + " 'title': 'PVI', \n", + " ...\n", + " }\n", + " \n", + " {\n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + "
href:'https://storage.info.uvt.ro/eodata/Sentinel-2/2025/5/10/T36TUR/S2A_MSIL1C_20250510T084731_N0511_R107_T36TUR_20250510T094847.SAFE/GRANULE/L1C_T36TUR_A051613_20250510T085645/QI_DATA/T36TUR_20250510T084731_PVI.tif',
type:'image/tiff; application=geotiff; profile=cloud-optimized',
title:'PVI',
roles:['data'\n", + " ],
}\n", + "
\n", + "
\n", + "
\n", + " 'TCI': \n", + " {\n", + " 'roles': '['visual']', \n", + " 'type': 'image/tiff; application=geotiff; profile=cloud-optimized', \n", + " 'title': 'TCI', \n", + " ...\n", + " }\n", + " \n", + " {\n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + "
href:'https://storage.info.uvt.ro/eodata/Sentinel-2/2025/5/10/T36TUR/S2A_MSIL1C_20250510T084731_N0511_R107_T36TUR_20250510T094847.SAFE/GRANULE/L1C_T36TUR_A051613_20250510T085645/IMG_DATA/T36TUR_20250510T084731_TCI.tif',
type:'image/tiff; application=geotiff; profile=cloud-optimized',
title:'TCI',
eo:bands:[{\n", + " 'name': 'B04'\n", + " , \n", + " 'common_name': 'red'\n", + " , \n", + " 'description': 'Band 4 - Red'\n", + " , \n", + " 'center_wavelength': 0.665\n", + " , \n", + " 'full_width_half_max': 0.038\n", + " }\n", + " ,
{\n", + " 'name': 'B03'\n", + " , \n", + " 'common_name': 'green'\n", + " , \n", + " 'description': 'Band 3 - Green'\n", + " , \n", + " 'center_wavelength': 0.56\n", + " , \n", + " 'full_width_half_max': 0.045\n", + " }\n", + " ,
{\n", + " 'name': 'B02'\n", + " , \n", + " 'common_name': 'blue'\n", + " , \n", + " 'description': 'Band 2 - Blue'\n", + " , \n", + " 'center_wavelength': 0.49\n", + " , \n", + " 'full_width_half_max': 0.098\n", + " }\n", + " ],
proj:bbox:[300000.0\n", + " , 4990200.0\n", + " , 409800.0\n", + " , 5100000.0\n", + " ],
proj:shape:[10980\n", + " , 10980\n", + " ],
proj:transform:[10.0\n", + " , 0.0\n", + " , 300000.0\n", + " , 0.0\n", + " , -10.0\n", + " , 5100000.0\n", + " , 0.0\n", + " , 0.0\n", + " , 1.0\n", + " ],
proj:code:'EPSG:32636',
roles:['visual'\n", + " ],
}\n", + "
\n", + "
\n", + "
\n", + " 'manifest.safe': \n", + " {\n", + " 'roles': '['metadata']', \n", + " 'type': 'application/xml', \n", + " 'title': 'manifest.safe', \n", + " ...\n", + " }\n", + " \n", + " {\n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + "
href:'https://storage.info.uvt.ro/eodata/Sentinel-2/2025/5/10/T36TUR/S2A_MSIL1C_20250510T084731_N0511_R107_T36TUR_20250510T094847.SAFE/manifest.safe',
type:'application/xml',
title:'manifest.safe',
roles:['metadata'\n", + " ],
}\n", + "
\n", + "
\n", + "
\n", + " 'ql.jpg': \n", + " {\n", + " 'roles': '['overview']', \n", + " 'type': 'image/jpeg', \n", + " 'title': 'ql.jpg', \n", + " ...\n", + " }\n", + " \n", + " {\n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + "
href:'https://storage.info.uvt.ro/eodata/Sentinel-2/2025/5/10/T36TUR/S2A_MSIL1C_20250510T084731_N0511_R107_T36TUR_20250510T094847.SAFE/S2A_MSIL1C_20250510T084731_N0511_R107_T36TUR_20250510T094847-ql.jpg',
type:'image/jpeg',
title:'ql.jpg',
roles:['overview'\n", + " ],
}\n", + "
\n", + "
\n", + "
geometry
\n", + "
\n", + "
" + ], + "text/plain": [ + "SearchResult([EOProduct(id=S2B_27VWK_20240206_0_L1C, provider=earth_search),\n", + " EOProduct(id=S2A_MSIL1C_20250510T084731_N0511_R107_T36TUR_20250510T094847, provider=generic_stac_provider)])" + ] + }, + "execution_count": 19, + "metadata": {}, + "output_type": "execute_result" + } + ], + "source": [ + "dag.import_stac_items(\n", + " [\n", + " \"https://earth-search.aws.element84.com/v1/collections/sentinel-2-l1c/items/S2B_27VWK_20240206_0_L1C\",\n", + " \"https://stac.sage.uvt.ro/collections/sentinel-2-l1c/items/S2A_MSIL1C_20250510T084731_N0511_R107_T36TUR_20250510T094847\",\n", + " ]\n", + ")" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "### `SearchResult.from_dict`\n", + "\n", + "[SearchResult.from_dict()](../../api_reference/searchresult.rst#eodag.api.search_result.SearchResult.from_dict) will build a [SearchResult](../../api_reference/searchresult.rst#eodag.api.search_result.SearchResult) from a given dictionary. If `dag` parameter is given, the method will use it to register products downloader. If not\n", + "provided, the downloader and authenticator will not be registered." + ] + }, + { + "cell_type": "code", + "execution_count": 20, + "metadata": {}, + "outputs": [ + { + "data": { + "text/html": [ + "\n", + " \n", + " \n", + "
\n", + " SearchResult (2)\n", + "
\n", + "
\n", + " 0 \n", + " EOProduct(id=S2B_MSIL1C_20240703T104629_N0510_R051_T31TEJ_20240703T114318, provider=cop_dataspace)\n", + " \n", + " \n", + " \n", + "\n", + " \n", + " \n", + " \n", + " \n", + " \n", + "
\n", + " EOProduct\n", + "
\n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + "
provider:'cop_dataspace',
collection:'S2_MSI_L1C',
properties["id"]:'S2B_MSIL1C_20240703T104629_N0510_R051_T31TEJ_20240703T114318',
properties["start_datetime"]:'2024-07-03T10:46:29.024000Z',
properties["end_datetime"]:'2024-07-03T10:46:29.024000Z',
\n", + "
properties: (30){\n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + "
constellation:'SENTINEL-2',
datetime:'2024-07-03T10:46:29.024000Z',
end_datetime:'2024-07-03T10:46:29.024000Z',
id:'S2B_MSIL1C_20240703T104629_N0510_R051_T31TEJ_20240703T114318',
instruments:['MSI'\n", + " ],
platform:'S2B',
providers:[{\n", + " 'name': 'ESA'\n", + " , \n", + " 'roles': ['producer'\n", + " ]\n", + " }\n", + " ,
{\n", + " 'name': 'cop_dataspace'\n", + " , \n", + " 'roles': ['host'\n", + " ]\n", + " }\n", + " ],
published:'2024-07-03T12:42:14.249198Z',
start_datetime:'2024-07-03T10:46:29.024000Z',
title:'S2B_MSIL1C_20240703T104629_N0510_R051_T31TEJ_20240703T114318',
uid:'c010825a-c3a6-46a0-948e-005521edf124',
updated:'2024-11-09T03:15:32.907273Z',
cop_dataspace:sourceProduct:'S2B_OPER_MSI_L1C_TL_2BPS_20240703T114318_A038258_T31TEJ_N05.10,S2B_OPER_MSI_L1C_DS_2BPS_20240703T114318_S20240703T104623_N05.10,S2B_OPER_MSI_L1C_TC_2BPS_20240703T114318_A038258_T31TEJ_N05.10.jp2',
cop_dataspace:sourceProductOriginDate:'2024-07-03T12:35:09Z,2024-07-03T12:23:12Z,2024-07-03T12:35:09Z',
eo:cloud_cover:14.423965639102,
eodag:download_link:'https://catalogue.dataspace.copernicus.eu/odata/v1/Products(c010825a-c3a6-46a0-948e-005521edf124)/$value',
eodag:quicklook:'https://catalogue.dataspace.copernicus.eu/odata/v1/Assets(396a9522-3f07-4645-9196-a65c349ad8e9)/$value',
eodag:thumbnail:'https://catalogue.dataspace.copernicus.eu/odata/v1/Assets(396a9522-3f07-4645-9196-a65c349ad8e9)/$value',
grid:code:'MGRS-31TEJ',
order:status:'succeeded',
processing:datetime:'2024-07-03T11:43:18.000000Z',
processing:level:'S2MSI1C',
processing:version:'05.10',
product:type:'S2MSI1C',
s2:datastrip_id:'S2B_OPER_MSI_L1C_DS_2BPS_20240703T114318_S20240703T104623_N05.10',
s2:datatake_id:'GS2B_20240703T104629_038258_N05.10',
s2:datatake_type:'INS-NOBS',
s2:tile_id:'S2B_OPER_MSI_L1C_TL_2BPS_20240703T114318_A038258_T31TEJ_N05.10',
sat:absolute_orbit:38258,
sat:relative_orbit:51,
}
\n", + "
assets: (0)
\n", + "
geometry
thumbnail
\n", + "
\n", + "
\n", + "
\n", + " 1 \n", + " EOProduct(id=S2A_MSIL1C_20240705T104021_N0510_R008_T31TEJ_20240705T142137, provider=cop_dataspace)\n", + " \n", + " \n", + " \n", + "\n", + " \n", + " \n", - " \n", + " \n", " \n", " \n", "
\n", + " EOProduct\n", + "
\n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + "
provider:'cop_dataspace',
collection:'S2_MSI_L1C',
properties["id"]:'S2A_MSIL1C_20240705T104021_N0510_R008_T31TEJ_20240705T142137',
properties["start_datetime"]:'2024-07-05T10:40:21.025000Z',
properties["end_datetime"]:'2024-07-05T10:40:21.025000Z',
\n", + "
properties: (30){\n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", " \n", "
constellation:'SENTINEL-2',
datetime:'2024-07-05T10:40:21.025000Z',
end_datetime:'2024-07-05T10:40:21.025000Z',
id:'S2A_MSIL1C_20240705T104021_N0510_R008_T31TEJ_20240705T142137',
instruments:['MSI'\n", + " ],
platform:'S2A',
providers:[{\n", " 'name': 'ESA'\n", @@ -1342,7 +6052,7 @@ "
}
\n", "
assets: (0)
\n", "
geometry
geometry
thumbnail
\n", @@ -1355,44 +6065,27 @@ " EOProduct(id=S2A_MSIL1C_20240705T104021_N0510_R008_T31TEJ_20240705T142137, provider=cop_dataspace)])" ] }, - "execution_count": 10, + "execution_count": 20, "metadata": {}, "output_type": "execute_result" } ], "source": [ - "deserialized_search_results = dag.deserialize(output_file)\n", - "deserialized_search_results" - ] - }, - { - "cell_type": "code", - "execution_count": 11, - "metadata": {}, - "outputs": [ - { - "ename": "RuntimeError", - "evalue": "EO product is unable to download itself due to lacking of a download plugin", - "output_type": "error", - "traceback": [ - "\u001b[31mRuntimeError\u001b[39m\u001b[31m:\u001b[39m EO product is unable to download itself due to lacking of a download plugin\n" - ] - } - ], - "source": [ - "deserialized_search_results[0].download()" + "SearchResult.from_dict(search_results_dict, dag=dag)" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ - "Trying to download a product from a [SearchResult](../../api_reference/searchresult.rst#eodag.api.search_result.SearchResult) that was loaded with [serialize()](../../api_reference/core.rst#eodag.api.core.EODataAccessGateway.deserialize) since it doesn't try to configure each product so that it can be downloaded." + "### `SearchResult.from_file`\n", + "\n", + "[SearchResult.from_dict()](../../api_reference/searchresult.rst#eodag.api.search_result.SearchResult.from_dict) will build a [SearchResult](../../api_reference/searchresult.rst#eodag.api.search_result.SearchResult) from a serialized Features Collection file. If `dag` parameter is given, the method will use it to register products downloader. If not provided, the downloader and authenticator will not be registered." ] }, { "cell_type": "code", - "execution_count": 12, + "execution_count": 21, "metadata": {}, "outputs": [ { @@ -1752,81 +6445,41 @@ "
\n", "
\n", "
" - ], - "text/plain": [ - "SearchResult([EOProduct(id=S2B_MSIL1C_20240703T104629_N0510_R051_T31TEJ_20240703T114318, provider=cop_dataspace),\n", - " EOProduct(id=S2A_MSIL1C_20240705T104021_N0510_R008_T31TEJ_20240705T142137, provider=cop_dataspace)])" - ] - }, - "execution_count": 12, - "metadata": {}, - "output_type": "execute_result" - } - ], - "source": [ - "deserialized_and_registered = dag.deserialize_and_register(output_file)\n", - "deserialized_and_registered" - ] - }, - { - "cell_type": "code", - "execution_count": 13, - "metadata": {}, - "outputs": [ - { - "data": { - "application/vnd.jupyter.widget-view+json": { - "model_id": "5528ebcd05054eaba20e9b2c4b4a987d", - "version_major": 2, - "version_minor": 0 - }, + "
" + ], "text/plain": [ - "0.00B [00:00, ?B/s]" + "SearchResult([EOProduct(id=S2B_MSIL1C_20240703T104629_N0510_R051_T31TEJ_20240703T114318, provider=cop_dataspace),\n", + " EOProduct(id=S2A_MSIL1C_20240705T104021_N0510_R008_T31TEJ_20240705T142137, provider=cop_dataspace)])" ] }, + "execution_count": 21, "metadata": {}, - "output_type": "display_data" + "output_type": "execute_result" } ], "source": [ - "product_path = deserialized_and_registered[0].download(\n", - " output_dir=workspace,\n", - ")" - ] - }, - { - "cell_type": "markdown", - "metadata": {}, - "source": [ - "Downloading the product with [deserialize_and_register()](../../api_reference/core.rst#eodag.api.core.EODataAccessGateway.deserialize_and_register) works as expected." + "SearchResult.from_file(output_file, dag=dag)" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ - "After using `deserialize_and_register`, you can access the next page of results (if available):\n" + "### `EOProduct.from_dict`\n", + "\n", + "[EOProduct.from_dict()](../../api_reference/eoproduct.rst#eodag.api.product._product.EOProduct.from_dict) will build a [EOProduct](../../api_reference/eoproduct.rst#eodag.api.product._product.EOProduct) from a given dictionary. If `dag` parameter is given, the method will use it to register the product downloader. If not\n", + "provided, the downloader and authenticator will not be registered." ] }, { "cell_type": "code", - "execution_count": 14, + "execution_count": 22, "metadata": {}, "outputs": [ { "data": { "text/html": [ "\n", - " \n", - " \n", - " \n", - " \n", + " \n", + " \n", " \n", - "
\n", - " SearchResult (2)\n", - "
\n", - "
\n", - " 0 \n", - " EOProduct(id=S2A_MSIL1C_20240708T105031_N0510_R051_T31TEJ_20240708T125024, provider=cop_dataspace)\n", - " \n", - " \n", " \n", @@ -1843,15 +6496,15 @@ " \n", " \n", " \n", - " \n", + " \n", " \n", " \n", " \n", - " \n", + " \n", " \n", " \n", " \n", - " \n", + " \n", " \n", "
\n", " EOProduct\n", "
properties["id"]:'S2A_MSIL1C_20240708T105031_N0510_R051_T31TEJ_20240708T125024','S2B_MSIL1C_20240703T104629_N0510_R051_T31TEJ_20240703T114318',
properties["start_datetime"]:'2024-07-08T10:50:31.024000Z','2024-07-03T10:46:29.024000Z',
properties["end_datetime"]:'2024-07-08T10:50:31.024000Z','2024-07-03T10:46:29.024000Z',
\n", "
properties: (30){\n", @@ -1860,15 +6513,15 @@ " \n", " \n", " \n", - " \n", + " \n", " \n", " \n", " \n", - " \n", + " \n", " \n", " \n", " \n", - " \n", + " \n", " \n", " \n", " \n", @@ -1877,7 +6530,7 @@ " \n", " \n", " \n", - " \n", + " \n", " \n", " \n", " \n", @@ -1887,51 +6540,57 @@ " 'roles': ['producer'\n", " ]\n", " }\n", + " ,
{\n", + " 'name': 'cop_dataspace'\n", + " , \n", + " 'roles': ['host'\n", + " ]\n", + " }\n", " ],\n", " \n", " \n", " \n", - " \n", + " \n", " \n", " \n", " \n", - " \n", + " \n", " \n", " \n", " \n", - " \n", + " \n", " \n", " \n", " \n", - " \n", + " \n", " \n", " \n", " \n", - " \n", + " \n", " \n", " \n", " \n", - " \n", + " \n", " \n", " \n", " \n", - " \n", + " \n", " \n", " \n", " \n", - " \n", + " \n", " \n", " \n", " \n", - " \n", + " \n", " \n", " \n", " \n", - " \n", + " \n", " \n", " \n", " \n", - " \n", + " \n", " \n", " \n", " \n", @@ -1943,7 +6602,7 @@ " \n", " \n", " \n", - " \n", + " \n", " \n", " \n", " \n", @@ -1959,11 +6618,11 @@ " \n", " \n", " \n", - " \n", + " \n", " \n", " \n", " \n", - " \n", + " \n", " \n", " \n", " \n", @@ -1971,11 +6630,11 @@ " \n", " \n", " \n", - " \n", + " \n", " \n", " \n", " \n", - " \n", + " \n", " \n", " \n", " \n", @@ -1984,18 +6643,42 @@ "
datetime:'2024-07-08T10:50:31.024000Z','2024-07-03T10:46:29.024000Z',
end_datetime:'2024-07-08T10:50:31.024000Z','2024-07-03T10:46:29.024000Z',
id:'S2A_MSIL1C_20240708T105031_N0510_R051_T31TEJ_20240708T125024','S2B_MSIL1C_20240703T104629_N0510_R051_T31TEJ_20240703T114318',
instruments:
platform:'S2A','S2B',
providers:
published:'2024-07-08T15:06:53.189989Z','2024-07-03T12:42:14.249198Z',
start_datetime:'2024-07-08T10:50:31.024000Z','2024-07-03T10:46:29.024000Z',
title:'S2A_MSIL1C_20240708T105031_N0510_R051_T31TEJ_20240708T125024','S2B_MSIL1C_20240703T104629_N0510_R051_T31TEJ_20240703T114318',
uid:'cb65260d-58b9-471a-8aa9-3263e97d6bd4','c010825a-c3a6-46a0-948e-005521edf124',
updated:'2024-11-08T13:10:28.998813Z','2024-11-09T03:15:32.907273Z',
cop_dataspace:sourceProduct:'S2A_OPER_MSI_L1C_TL_2APS_20240708T125024_A047238_T31TEJ_N05.10,S2A_OPER_MSI_L1C_DS_2APS_20240708T125024_S20240708T105028_N05.10,S2A_OPER_MSI_L1C_TC_2APS_20240708T125024_A047238_T31TEJ_N05.10.jp2','S2B_OPER_MSI_L1C_TL_2BPS_20240703T114318_A038258_T31TEJ_N05.10,S2B_OPER_MSI_L1C_DS_2BPS_20240703T114318_S20240703T104623_N05.10,S2B_OPER_MSI_L1C_TC_2BPS_20240703T114318_A038258_T31TEJ_N05.10.jp2',
cop_dataspace:sourceProductOriginDate:'2024-07-08T14:59:09Z,2024-07-08T14:59:04Z,2024-07-08T14:59:10Z','2024-07-03T12:35:09Z,2024-07-03T12:23:12Z,2024-07-03T12:35:09Z',
eo:cloud_cover:0.0,14.423965639102,
eodag:download_link:'https://catalogue.dataspace.copernicus.eu/odata/v1/Products(cb65260d-58b9-471a-8aa9-3263e97d6bd4)/$value','https://catalogue.dataspace.copernicus.eu/odata/v1/Products(c010825a-c3a6-46a0-948e-005521edf124)/$value',
eodag:quicklook:'https://catalogue.dataspace.copernicus.eu/odata/v1/Assets(2456fc96-b92b-4310-a088-8932f1db0095)/$value','https://catalogue.dataspace.copernicus.eu/odata/v1/Assets(396a9522-3f07-4645-9196-a65c349ad8e9)/$value',
eodag:thumbnail:'https://catalogue.dataspace.copernicus.eu/odata/v1/Assets(2456fc96-b92b-4310-a088-8932f1db0095)/$value','https://catalogue.dataspace.copernicus.eu/odata/v1/Assets(396a9522-3f07-4645-9196-a65c349ad8e9)/$value',
grid:code:
processing:datetime:'2024-07-08T12:50:24.000000Z','2024-07-03T11:43:18.000000Z',
processing:level:
s2:datastrip_id:'S2A_OPER_MSI_L1C_DS_2APS_20240708T125024_S20240708T105028_N05.10','S2B_OPER_MSI_L1C_DS_2BPS_20240703T114318_S20240703T104623_N05.10',
s2:datatake_id:'GS2A_20240708T105031_047238_N05.10','GS2B_20240703T104629_038258_N05.10',
s2:datatake_type:
s2:tile_id:'S2A_OPER_MSI_L1C_TL_2APS_20240708T125024_A047238_T31TEJ_N05.10','S2B_OPER_MSI_L1C_TL_2BPS_20240703T114318_A038258_T31TEJ_N05.10',
sat:absolute_orbit:47238,38258,
sat:relative_orbit:
}
\n", "
assets: (0)
\n", "
geometry
thumbnailgeometry
thumbnail
\n", - " \n", - " \n", - " \n", - "
\n", - " 1 \n", - " EOProduct(id=S2B_MSIL1C_20240710T103629_N0510_R008_T31TEJ_20240710T131044, provider=cop_dataspace)\n", - " \n", - " \n", + "
" + ], + "text/plain": [ + "EOProduct(id=S2B_MSIL1C_20240703T104629_N0510_R051_T31TEJ_20240703T114318, provider=cop_dataspace)" + ] + }, + "execution_count": 22, + "metadata": {}, + "output_type": "execute_result" + } + ], + "source": [ + "EOProduct.from_dict(product_dict, dag=dag)" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "### `EOProduct.from_file`\n", + "\n", + "[EOProduct.from_file()](../../api_reference/eoproduct.rst#eodag.api.product._product.EOProduct.from_file) will build a [EOProduct](../../api_reference/eoproduct.rst#eodag.api.product._product.EOProduct) from a serialized Feature / STAC item file. If `dag` parameter is given, the method will use it to register the product downloader. If not provided, the downloader and authenticator will not be registered." + ] + }, + { + "cell_type": "code", + "execution_count": 23, + "metadata": {}, + "outputs": [ + { + "data": { + "text/html": [ + "\n", " \n", @@ -2012,15 +6695,15 @@ " \n", " \n", " \n", - " \n", + " \n", " \n", " \n", " \n", - " \n", + " \n", " \n", " \n", " \n", - " \n", + " \n", " \n", "
\n", " EOProduct\n", "
properties["id"]:'S2B_MSIL1C_20240710T103629_N0510_R008_T31TEJ_20240710T131044','S2B_MSIL1C_20240703T104629_N0510_R051_T31TEJ_20240703T114318',
properties["start_datetime"]:'2024-07-10T10:36:29.024000Z','2024-07-03T10:46:29.024000Z',
properties["end_datetime"]:'2024-07-10T10:36:29.024000Z','2024-07-03T10:46:29.024000Z',
\n", "
properties: (30){\n", @@ -2029,15 +6712,15 @@ " \n", " \n", " \n", - " \n", + " \n", " \n", " \n", " \n", - " \n", + " \n", " \n", " \n", " \n", - " \n", + " \n", " \n", " \n", " \n", @@ -2056,51 +6739,57 @@ " 'roles': ['producer'\n", " ]\n", " }\n", + " ,
{\n", + " 'name': 'cop_dataspace'\n", + " , \n", + " 'roles': ['host'\n", + " ]\n", + " }\n", " ],\n", " \n", " \n", " \n", - " \n", + " \n", " \n", " \n", " \n", - " \n", + " \n", " \n", " \n", " \n", - " \n", + " \n", " \n", " \n", " \n", - " \n", + " \n", " \n", " \n", " \n", - " \n", + " \n", " \n", " \n", " \n", - " \n", + " \n", " \n", " \n", " \n", - " \n", + " \n", " \n", " \n", " \n", - " \n", + " \n", " \n", " \n", " \n", - " \n", + " \n", " \n", " \n", " \n", - " \n", + " \n", " \n", " \n", " \n", - " \n", + " \n", " \n", " \n", " \n", @@ -2112,7 +6801,7 @@ " \n", " \n", " \n", - " \n", + " \n", " \n", " \n", " \n", @@ -2128,11 +6817,11 @@ " \n", " \n", " \n", - " \n", + " \n", " \n", " \n", " \n", - " \n", + " \n", " \n", " \n", " \n", @@ -2140,42 +6829,49 @@ " \n", " \n", " \n", - " \n", + " \n", " \n", " \n", " \n", - " \n", + " \n", " \n", " \n", " \n", - " \n", + " \n", " \n", "
datetime:'2024-07-10T10:36:29.024000Z','2024-07-03T10:46:29.024000Z',
end_datetime:'2024-07-10T10:36:29.024000Z','2024-07-03T10:46:29.024000Z',
id:'S2B_MSIL1C_20240710T103629_N0510_R008_T31TEJ_20240710T131044','S2B_MSIL1C_20240703T104629_N0510_R051_T31TEJ_20240703T114318',
instruments:
published:'2024-07-10T14:34:08.835998Z','2024-07-03T12:42:14.249198Z',
start_datetime:'2024-07-10T10:36:29.024000Z','2024-07-03T10:46:29.024000Z',
title:'S2B_MSIL1C_20240710T103629_N0510_R008_T31TEJ_20240710T131044','S2B_MSIL1C_20240703T104629_N0510_R051_T31TEJ_20240703T114318',
uid:'ed2523a6-143b-48e0-a663-a572a0bf8a6e','c010825a-c3a6-46a0-948e-005521edf124',
updated:'2024-11-07T15:13:13.209267Z','2024-11-09T03:15:32.907273Z',
cop_dataspace:sourceProduct:'S2B_OPER_MSI_L1C_TL_2BPS_20240710T131044_A038358_T31TEJ_N05.10,S2B_OPER_MSI_L1C_DS_2BPS_20240710T131044_S20240710T103819_N05.10,S2B_OPER_MSI_L1C_TC_2BPS_20240710T131044_A038358_T31TEJ_N05.10.jp2','S2B_OPER_MSI_L1C_TL_2BPS_20240703T114318_A038258_T31TEJ_N05.10,S2B_OPER_MSI_L1C_DS_2BPS_20240703T114318_S20240703T104623_N05.10,S2B_OPER_MSI_L1C_TC_2BPS_20240703T114318_A038258_T31TEJ_N05.10.jp2',
cop_dataspace:sourceProductOriginDate:'2024-07-10T14:21:50Z,2024-07-10T13:50:48Z,2024-07-10T14:21:40Z','2024-07-03T12:35:09Z,2024-07-03T12:23:12Z,2024-07-03T12:35:09Z',
eo:cloud_cover:0.058048911583,14.423965639102,
eodag:download_link:'https://catalogue.dataspace.copernicus.eu/odata/v1/Products(ed2523a6-143b-48e0-a663-a572a0bf8a6e)/$value','https://catalogue.dataspace.copernicus.eu/odata/v1/Products(c010825a-c3a6-46a0-948e-005521edf124)/$value',
eodag:quicklook:'https://catalogue.dataspace.copernicus.eu/odata/v1/Assets(0e6919dd-86b8-4a71-83c7-af156ae7838b)/$value','https://catalogue.dataspace.copernicus.eu/odata/v1/Assets(396a9522-3f07-4645-9196-a65c349ad8e9)/$value',
eodag:thumbnail:'https://catalogue.dataspace.copernicus.eu/odata/v1/Assets(0e6919dd-86b8-4a71-83c7-af156ae7838b)/$value','https://catalogue.dataspace.copernicus.eu/odata/v1/Assets(396a9522-3f07-4645-9196-a65c349ad8e9)/$value',
grid:code:
processing:datetime:'2024-07-10T13:10:44.000000Z','2024-07-03T11:43:18.000000Z',
processing:level:
s2:datastrip_id:'S2B_OPER_MSI_L1C_DS_2BPS_20240710T131044_S20240710T103819_N05.10','S2B_OPER_MSI_L1C_DS_2BPS_20240703T114318_S20240703T104623_N05.10',
s2:datatake_id:'GS2B_20240710T103629_038358_N05.10','GS2B_20240703T104629_038258_N05.10',
s2:datatake_type:
s2:tile_id:'S2B_OPER_MSI_L1C_TL_2BPS_20240710T131044_A038358_T31TEJ_N05.10','S2B_OPER_MSI_L1C_TL_2BPS_20240703T114318_A038258_T31TEJ_N05.10',
sat:absolute_orbit:38358,38258,
sat:relative_orbit:8,51,
}
\n", "
assets: (0)
\n", " \n", - " geometry
\n", - " thumbnail\n", + " geometry
\n", + " thumbnail\n", " \n", - " \n", - "
\n", - " \n", - " " + " " ], "text/plain": [ - "SearchResult([EOProduct(id=S2A_MSIL1C_20240708T105031_N0510_R051_T31TEJ_20240708T125024, provider=cop_dataspace),\n", - " EOProduct(id=S2B_MSIL1C_20240710T103629_N0510_R008_T31TEJ_20240710T131044, provider=cop_dataspace)])" + "EOProduct(id=S2B_MSIL1C_20240703T104629_N0510_R051_T31TEJ_20240703T114318, provider=cop_dataspace)" ] }, - "execution_count": 14, + "execution_count": 23, "metadata": {}, "output_type": "execute_result" } ], "source": [ - "next_page = deserialized_and_registered.next_page()\n", - "results_page_2 = next(next_page)\n", - "results_page_2" + "# save serialized to file\n", + "product_filepath = Path(workspace) / \"product.json\"\n", + "with open(product_filepath, \"w\") as f:\n", + " json.dump(product_dict, f)\n", + "\n", + "# build EOProduct from file\n", + "EOProduct.from_file(product_filepath, dag=dag)" ] + }, + { + "cell_type": "code", + "execution_count": null, + "metadata": {}, + "outputs": [], + "source": [] } ], "metadata": { @@ -2199,107 +6895,107 @@ "widgets": { "application/vnd.jupyter.widget-state+json": { "state": { - "11093e88409343e792b817f79de3e5f7": { - "model_module": "@jupyter-widgets/base", - "model_module_version": "2.0.0", - "model_name": "LayoutModel", - "state": {} - }, - "38c8431f47314b76b3d60a3c056c61f2": { + "2747b2b5af8343c289851da9b0a309db": { "model_module": "@jupyter-widgets/base", "model_module_version": "2.0.0", "model_name": "LayoutModel", "state": { - "flex": "2" + "display": "inline-flex", + "flex_flow": "row wrap", + "width": "100%" } }, - "4150a23276db4993906da465e6779414": { - "model_module": "@jupyter-widgets/base", + "39a610f85fd14f189c68f0de842e0621": { + "model_module": "@jupyter-widgets/controls", "model_module_version": "2.0.0", - "model_name": "LayoutModel", + "model_name": "FloatProgressModel", "state": { - "display": "inline-flex", - "flex_flow": "row wrap", - "width": "100%" + "bar_style": "success", + "layout": "IPY_MODEL_aafea1095e924d3b9ae8752fa7f980e9", + "max": 66, + "style": "IPY_MODEL_86577094c9e740358b0dde7b2923d21b", + "value": 66 } }, - "5528ebcd05054eaba20e9b2c4b4a987d": { + "585786b05d854294a98e433eb4958852": { "model_module": "@jupyter-widgets/controls", "model_module_version": "2.0.0", - "model_name": "HBoxModel", + "model_name": "HTMLStyleModel", "state": { - "children": [ - "IPY_MODEL_6618f842466a4be4bdea76c8b7127b0b", - "IPY_MODEL_802a405790804a889c34a60c884f14f5", - "IPY_MODEL_f25fd098565a4b86a17f00dab8f95c0a" - ], - "layout": "IPY_MODEL_4150a23276db4993906da465e6779414" + "description_width": "", + "font_size": null, + "text_color": null } }, - "6618f842466a4be4bdea76c8b7127b0b": { + "5971b535b78845edb6cdc300729151f7": { + "model_module": "@jupyter-widgets/base", + "model_module_version": "2.0.0", + "model_name": "LayoutModel", + "state": {} + }, + "86577094c9e740358b0dde7b2923d21b": { "model_module": "@jupyter-widgets/controls", "model_module_version": "2.0.0", - "model_name": "HTMLModel", + "model_name": "ProgressStyleModel", "state": { - "layout": "IPY_MODEL_11093e88409343e792b817f79de3e5f7", - "style": "IPY_MODEL_fb13fa0c165e4bfd82609eb7831529cd", - "value": "Extracting files from S2B_MSIL1C_20240703T104629_N0510_R051_T31TEJ_20240703T114318.zip: 100%" + "description_width": "" } }, - "802a405790804a889c34a60c884f14f5": { + "923f007a09694a2389613ea6c8460039": { "model_module": "@jupyter-widgets/controls", "model_module_version": "2.0.0", - "model_name": "FloatProgressModel", + "model_name": "HTMLStyleModel", "state": { - "bar_style": "success", - "layout": "IPY_MODEL_38c8431f47314b76b3d60a3c056c61f2", - "max": 66, - "style": "IPY_MODEL_f262e3ff807149ec8a742aa9dd8201fa", - "value": 66 + "description_width": "", + "font_size": null, + "text_color": null } }, - "be9ba0f8b80744f28228bd9f8807c599": { + "a40e99eacde04f12bf2dcb21cbc3e816": { "model_module": "@jupyter-widgets/base", "model_module_version": "2.0.0", "model_name": "LayoutModel", "state": {} }, - "c5d6ef6f8ce74642b16c0a1ae4e6a582": { - "model_module": "@jupyter-widgets/controls", + "aafea1095e924d3b9ae8752fa7f980e9": { + "model_module": "@jupyter-widgets/base", "model_module_version": "2.0.0", - "model_name": "HTMLStyleModel", + "model_name": "LayoutModel", "state": { - "description_width": "", - "font_size": null, - "text_color": null + "flex": "2" } }, - "f25fd098565a4b86a17f00dab8f95c0a": { + "c1e4ded5c506498c8d86591db8490b6b": { "model_module": "@jupyter-widgets/controls", "model_module_version": "2.0.0", - "model_name": "HTMLModel", + "model_name": "HBoxModel", "state": { - "layout": "IPY_MODEL_be9ba0f8b80744f28228bd9f8807c599", - "style": "IPY_MODEL_c5d6ef6f8ce74642b16c0a1ae4e6a582", - "value": " 66/66 [00:00<00:00, 2283.91file/s]" + "children": [ + "IPY_MODEL_d497feaf86ee4761b32422155f1cf761", + "IPY_MODEL_39a610f85fd14f189c68f0de842e0621", + "IPY_MODEL_da93b50aae2248ae831092f1e55f5d0a" + ], + "layout": "IPY_MODEL_2747b2b5af8343c289851da9b0a309db" } }, - "f262e3ff807149ec8a742aa9dd8201fa": { + "d497feaf86ee4761b32422155f1cf761": { "model_module": "@jupyter-widgets/controls", "model_module_version": "2.0.0", - "model_name": "ProgressStyleModel", + "model_name": "HTMLModel", "state": { - "description_width": "" + "layout": "IPY_MODEL_5971b535b78845edb6cdc300729151f7", + "style": "IPY_MODEL_585786b05d854294a98e433eb4958852", + "value": "Extracting files from S2B_MSIL1C_20240703T104629_N0510_R051_T31TEJ_20240703T114318.zip: 100%" } }, - "fb13fa0c165e4bfd82609eb7831529cd": { + "da93b50aae2248ae831092f1e55f5d0a": { "model_module": "@jupyter-widgets/controls", "model_module_version": "2.0.0", - "model_name": "HTMLStyleModel", + "model_name": "HTMLModel", "state": { - "description_width": "", - "font_size": null, - "text_color": null + "layout": "IPY_MODEL_a40e99eacde04f12bf2dcb21cbc3e816", + "style": "IPY_MODEL_923f007a09694a2389613ea6c8460039", + "value": " 66/66 [00:00<00:00, 2119.81file/s]" } } }, From aa6631c019efb2b912f40c23e1fc7a6a763b2ad4 Mon Sep 17 00:00:00 2001 From: Sylvain Brunato Date: Thu, 2 Apr 2026 11:56:35 +0200 Subject: [PATCH 12/13] docs: fixed links in notebooks --- docs/notebooks/api_user_guide/3_search.ipynb | 16 +++++++++------- 1 file changed, 9 insertions(+), 7 deletions(-) diff --git a/docs/notebooks/api_user_guide/3_search.ipynb b/docs/notebooks/api_user_guide/3_search.ipynb index 9d14cad904..1355858ccf 100644 --- a/docs/notebooks/api_user_guide/3_search.ipynb +++ b/docs/notebooks/api_user_guide/3_search.ipynb @@ -1940,7 +1940,7 @@ "cell_type": "markdown", "metadata": {}, "source": [ - "An [EOProduct](../../api_reference/eoproduct.rst#eodag.api.product._product.EOProduct) has an [as_dict()](../../api_reference/eoproduct.rst#eodag.api.product._product.EOProduct.as_dict) to convert it into a GeoJSON-like dictionary and a [from_geojson()](../../api_reference/eoproduct.rst#eodag.api.product._product.EOProduct.from_geojson) method to create an [EOProduct](../../api_reference/eoproduct.rst#eodag.api.product._product.EOProduct) from a GeoJSON dictionary." + "An [EOProduct](../../api_reference/eoproduct.rst#eodag.api.product._product.EOProduct) has an [as_dict()](../../api_reference/eoproduct.rst#eodag.api.product._product.EOProduct.as_dict) to convert it into a GeoJSON-like dictionary and a [from_dict()](../../api_reference/eoproduct.rst#eodag.api.product._product.EOProduct.from_dict) method to create an [EOProduct](../../api_reference/eoproduct.rst#eodag.api.product._product.EOProduct) from a GeoJSON dictionary." ] }, { @@ -2120,7 +2120,7 @@ "source": [ "from eodag import EOProduct\n", "product_geojson_structure = one_product.as_dict()\n", - "recreated_product = EOProduct.from_geojson(product_geojson_structure)\n", + "recreated_product = EOProduct.from_dict(product_geojson_structure)\n", "recreated_product" ] }, @@ -2128,12 +2128,12 @@ "cell_type": "markdown", "metadata": {}, "source": [ - "Since [EOProduct](../../api_reference/eoproduct.rst#eodag.api.product._product.EOProduct)s have a way to convert themselves to a GeoJSON dictionary, it is natural to be able to convert a [SearchResult](../../api_reference/searchresult.rst#eodag.api.search_result.SearchResult) object to a GeoJSON *FeatureCollection* ([as_geojson_object()](../../api_reference/searchresult.rst#eodag.api.search_result.SearchResult.as_geojson_object)). It is also possible to create a [SearchResult](../../api_reference/searchresult.rst#eodag.api.search_result.SearchResult) from a dictionary structured as a *FeatureCollection* with [from_geojson()](../../api_reference/searchresult.rst#eodag.api.search_result.SearchResult.from_geojson)." + "Since [EOProduct](../../api_reference/eoproduct.rst#eodag.api.product._product.EOProduct)s have a way to convert themselves to a GeoJSON dictionary, it is natural to be able to convert a [SearchResult](../../api_reference/searchresult.rst#eodag.api.search_result.SearchResult) object to a GeoJSON *FeatureCollection* ([as_dict()](../../api_reference/searchresult.rst#eodag.api.search_result.SearchResult.as_dict)). It is also possible to create a [SearchResult](../../api_reference/searchresult.rst#eodag.api.search_result.SearchResult) from a dictionary structured as a *FeatureCollection* with [from_dict()](../../api_reference/searchresult.rst#eodag.api.search_result.SearchResult.from_dict)." ] }, { "cell_type": "code", - "execution_count": 23, + "execution_count": null, "metadata": {}, "outputs": [ { @@ -2483,8 +2483,8 @@ ], "source": [ "from eodag import SearchResult\n", - "feature_collection = all_products.as_geojson_object()\n", - "recreated_search_result = SearchResult.from_geojson(feature_collection)\n", + "feature_collection = all_products.as_dict()\n", + "recreated_search_result = SearchResult.from_dict(feature_collection)\n", "recreated_search_result[:2]" ] }, @@ -2492,7 +2492,9 @@ "cell_type": "markdown", "metadata": {}, "source": [ - "You can also convert a [SearchResult](../../api_reference/searchresult.rst#eodag.api.search_result.SearchResult) object to other formats, like `shapely.geometry.GeometryCollection` ([as_shapely_geometry_object()](../../api_reference/searchresult.rst#eodag.api.search_result.SearchResult.as_shapely_geometry_object)), and `WKT` ([as_wkt_object()](../../api_reference/searchresult.rst#eodag.api.search_result.SearchResult.as_wkt_object))." + "You can also convert a [SearchResult](../../api_reference/searchresult.rst#eodag.api.search_result.SearchResult) object to other formats, like `shapely.GeometryCollection` ([as_shapely_geometry_object()](../../api_reference/searchresult.rst#eodag.api.search_result.SearchResult.as_shapely_geometry_object)), and `WKT` ([as_wkt_object()](../../api_reference/searchresult.rst#eodag.api.search_result.SearchResult.as_wkt_object)).\n", + "\n", + "For more information on conversion methods, see [Serialize/Deserialize](./5_serialize_deserialize.ipynb) from API User Guide." ] }, { From d6f8c91fa910b97d275387a46f0d7a3d56292c99 Mon Sep 17 00:00:00 2001 From: Sylvain Brunato Date: Thu, 2 Apr 2026 14:34:06 +0200 Subject: [PATCH 13/13] docs: fixed another link in tuto --- docs/notebooks/api_user_guide/5_serialize_deserialize.ipynb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/notebooks/api_user_guide/5_serialize_deserialize.ipynb b/docs/notebooks/api_user_guide/5_serialize_deserialize.ipynb index ea70b0bf59..c3a60ac4d3 100644 --- a/docs/notebooks/api_user_guide/5_serialize_deserialize.ipynb +++ b/docs/notebooks/api_user_guide/5_serialize_deserialize.ipynb @@ -2750,7 +2750,7 @@ "\n", "[import_stac_items()](../../api_reference/core.rst#eodag.api.core.EODataAccessGateway.import_stac_items) will import STAC items from a list of URLs and convert them to a [SearchResult](../../api_reference/searchresult.rst#eodag.api.search_result.SearchResult).\n", "\n", - "- Origin provider and download links will be set if item comes from an EODAG server (see [stac-fastapi-eodag](github.com/CS-SI/stac-fastapi-eodag)).\n", + "- Origin provider and download links will be set if item comes from an EODAG server (see [stac-fastapi-eodag](https://github.com/CS-SI/stac-fastapi-eodag)).\n", "- If item comes from a known EODAG provider, result will be registered to it, ready to download and its metadata normalized.\n", "- If item comes from an unknown provider, a generic STAC provider will be used." ]