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

Added provider option

parent 7ebcc741
No related branches found
No related tags found
No related merge requests found
...@@ -22,8 +22,14 @@ ROOT = Path(os.path.realpath(__file__)).parent.parent ...@@ -22,8 +22,14 @@ ROOT = Path(os.path.realpath(__file__)).parent.parent
class S2cEodag: class S2cEodag:
def __init__(self, name: str): def __init__(
self,
name: str = None,
provider: str = "peps"
):
self.name = name self.name = name
self.provider = provider
self.products = None self.products = None
eodag_centroids_shp = SHARED_DATA.get("eodag_centroids_shp") eodag_centroids_shp = SHARED_DATA.get("eodag_centroids_shp")
...@@ -45,7 +51,7 @@ class S2cEodag: ...@@ -45,7 +51,7 @@ class S2cEodag:
self.dag = EODataAccessGateway(locations_conf_path = eodag_custom_location_cfg) self.dag = EODataAccessGateway(locations_conf_path = eodag_custom_location_cfg)
logging.disable(logging.NOTSET) logging.disable(logging.NOTSET)
self.dag.set_preferred_provider("peps") self.dag.set_preferred_provider(self.provider)
# logger.info(self.dag.available_providers("S2_MSI_L1C")) # logger.info(self.dag.available_providers("S2_MSI_L1C"))
targeted_tile = [ targeted_tile = [
......
...@@ -723,12 +723,13 @@ class Tile: ...@@ -723,12 +723,13 @@ class Tile:
def get_l1c( def get_l1c(
self, self,
provider: str = "peps",
download: bool = True, download: bool = True,
dl_mode: str = "multit", dl_mode: str = "multit",
start: str = "2015-01-01", start: str = "2015-01-01",
end: str = "9999-12-31", end: str = "9999-12-31",
): ):
dag = S2cEodag(self.name) dag = S2cEodag(self.name, provider = provider)
dag.search(start = start, end = end) dag.search(start = start, end = end)
##### to do ##### to do
......
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