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

find products

parent 44c79b65
......@@ -48,7 +48,7 @@ class APISentinel(object):
# self.intersection_th = 30
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.
Args:
......@@ -67,11 +67,13 @@ class APISentinel(object):
Returns:
OrderedDict: Sentinel Product list found.
"""
products_list = self.api.query(area, date, area_relation='Intersects', **searchParameters)
return products_list
def downloadProducts(self,products,dir):
"""Download product(s) list Sentinel
"""
Download product(s) list Sentinel
Args:
self (pointer): The object pointer.
......@@ -79,7 +81,7 @@ class APISentinel(object):
dir (str): destination directory.
"""
os.chdir(dir)
# self.api.download_all(products)
# self.api.download_all(products)
for p in products:
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