Commit 5797d789 authored by Mario Chirinos Colunga's avatar Mario Chirinos Colunga 💬

find products

parent 44c79b65
...@@ -48,7 +48,7 @@ class APISentinel(object): ...@@ -48,7 +48,7 @@ class APISentinel(object):
# self.intersection_th = 30 # self.intersection_th = 30
self.api = SentinelAPI(self.username, self.password, self.URL_Sentinel) self.api = SentinelAPI(self.username, self.password, self.URL_Sentinel)
def getProducts(self, area, date, searchParameters): def getProducts(self, area, date, searchParameters):
"""Gets Sentinel products list that match the search parameters. """Gets Sentinel products list that match the search parameters.
Args: Args:
...@@ -67,11 +67,13 @@ class APISentinel(object): ...@@ -67,11 +67,13 @@ class APISentinel(object):
Returns: Returns:
OrderedDict: Sentinel Product list found. OrderedDict: Sentinel Product list found.
""" """
products_list = self.api.query(area, date, area_relation='Intersects', **searchParameters) products_list = self.api.query(area, date, area_relation='Intersects', **searchParameters)
return products_list return products_list
def downloadProducts(self,products,dir): def downloadProducts(self,products,dir):
"""Download product(s) list Sentinel """
Download product(s) list Sentinel
Args: Args:
self (pointer): The object pointer. self (pointer): The object pointer.
...@@ -79,7 +81,7 @@ class APISentinel(object): ...@@ -79,7 +81,7 @@ class APISentinel(object):
dir (str): destination directory. dir (str): destination directory.
""" """
os.chdir(dir) os.chdir(dir)
# self.api.download_all(products) # self.api.download_all(products)
for p in products: for p in products:
self.api.download(p) self.api.download(p)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment