Skip to content
Snippets Groups Projects
Commit c8a619a2 authored by pascal.mouquet_ird.fr's avatar pascal.mouquet_ird.fr
Browse files

eodag product list

parent 0b2b56da
No related branches found
No related tags found
No related merge requests found
......@@ -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())))
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment