test

parent e35b8020
......@@ -5,7 +5,8 @@ sys.path.append('../')
from geosentinel import APISentinel
from datetime import date
sentinel = APISentinel.APISentinel('asalazarg', 'geo135asg')
polygon = "POLYGON((-89.79030210118333 21.122657323983717,-89.77308220413153 21.122657323983717,-89.77308220413153 21.140540053466538,-89.79030210118333 21.140540053466538,-89.79030210118333 21.122657323983717))"
products = sentinel.getProducts(polygon, ('20150101', '20180517'), {"platformname":"Sentinel-2", "cloudcoverpercentage":"[0 TO 0]"})
area = "POLYGON((-89.79030210118333 21.122657323983717,-89.77308220413153 21.122657323983717,-89.77308220413153 21.140540053466538,-89.79030210118333 21.140540053466538,-89.79030210118333 21.122657323983717))"
footprint = "Intersects(POLYGON((-89.79030210118333 21.122657323983717,-89.77308220413153 21.122657323983717,-89.77308220413153 21.140540053466538,-89.79030210118333 21.140540053466538,-89.79030210118333 21.122657323983717)))"
products = sentinel.getProducts(area, ('20150101', '20180517'), {"platformname":"Sentinel-2", "cloudcoverpercentage":"[0 TO 10]"})
print len(products)
#sentinel.downloadProducts(products,dir)
......@@ -67,7 +67,7 @@ class APISentinel(object):
Returns:
OrderedDict: Sentinel Product list found.
"""
products_list = self.api.query(area, date, **searchParameters)
products_list = self.api.query(area, date, area_relation='Contains', **searchParameters)
return products_list
def downloadProducts(self,products,dir):
......
No preview for this file type
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