Commit 183eca23 authored by Lozac'h Loic's avatar Lozac'h Loic
Browse files

geomsearch

parent fc5026c3
......@@ -54,8 +54,11 @@ class EodagS1():
# geomwgs84 = Transform(qs_tile[0].geom, 4326)
logger.info(qs_tile[0].wgs84)
mpolywkt= str(qs_tile[0].wgs84.ewkt).split(";")
#print(mpolywkt[1])
if prodtypenum == 0:
geomsearch = str(qs_tile[0].wgs84.ewkt).split(";")[1]
elif prodtypenum in [1,2]:
geomsearch = str(qs_tile[0].wgs84.centroid.ewkt).split(";")[1]
product_types = ['S1_SAR_GRD','S2_MSI_L2A','S2_MSI_L3A_WASP']
......@@ -69,7 +72,7 @@ class EodagS1():
productType=product_types[prodtypenum],
start=startdate,
end=enddate,
geom=mpolywkt[1]
geom=geomsearch
)
logger.info(
......@@ -82,7 +85,7 @@ class EodagS1():
productType=product_types[prodtypenum],
start=startdate,
end=enddate,
geom=mpolywkt[1]
geom=geomsearch
)
logger.info(
......@@ -130,13 +133,12 @@ class EodagS1():
elif prodtypenum == 2:
logger.info("Search on Theia...")
self.mEODataAccessGateway.set_preferred_provider("theia")
mcentrowkt= str(qs_tile[0].wgs84.centroid.ewkt).split(";")
products_theia, estimated_theia_of_results = self.mEODataAccessGateway.search(
productType=product_types[prodtypenum],
start=startdate,
end=enddate,
geom=mcentrowkt[1]
geom=geomsearch
)
logger.info(
f"The THEIA search has found an estimated number of {estimated_theia_of_results} products matching your criteria "
......
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