From c8a619a2fdec1eda60e2afb54053fe06254a3193 Mon Sep 17 00:00:00 2001 From: impact <pascal.mouquet@ird.fr> Date: Tue, 5 Jul 2022 17:02:45 +0400 Subject: [PATCH] eodag product list --- sen2chain/download_eodag.py | 16 ++++++++++++---- 1 file changed, 12 insertions(+), 4 deletions(-) diff --git a/sen2chain/download_eodag.py b/sen2chain/download_eodag.py index 3f2716d..cc9dc5b 100644 --- a/sen2chain/download_eodag.py +++ b/sen2chain/download_eodag.py @@ -23,6 +23,7 @@ class S2cEodag: def __init__(self, name: str): self.name = name + self.products = None eodag_centroids_shp = SHARED_DATA.get("eodag_centroids_shp") with shapefile.Reader(eodag_centroids_shp) as shp: @@ -42,6 +43,8 @@ class S2cEodag: self.dag = EODataAccessGateway(locations_conf_path = eodag_custom_location_cfg) self.dag.set_preferred_provider("peps") + + logger.info(self.dag.available_providers("S2_MSI_L1C")) targeted_tile = [ sr @@ -63,11 +66,16 @@ class S2cEodag: end = end ) - products = self.dag.search_all( + self.products = self.dag.search_all( locations=dict(s2_tile_centroid=self.name), **default_search_criteria ) - logger.info("{} products were found given the above search criteria".format(len(products))) - logger.info(products) - logger.info([p.properties["storageStatus"] for p in products]) + + logger.info("{} products were found given the above search criteria".format(len(self.products))) + logger.info(self.products) + logger.info([p.properties["storageStatus"] for p in self.products]) + + logger.info("{} products were found given the above search criteria".format(len(self.products))) + logger.info("{} products were found given the above search criteria, online".format(len(self.products.filter_online()))) + -- GitLab