diff --git a/sen2chain/download_eodag.py b/sen2chain/download_eodag.py index 3f2716d0b693f5675c7f379f5802cd0af04972ff..cc9dc5b4b22eeff31f4719df0d64f2573d6a9927 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()))) +