From 1dfbeed724bb1384bd38c8741974e86e8f5f839d Mon Sep 17 00:00:00 2001 From: gra Date: Tue, 19 May 2020 14:53:57 -0300 Subject: [PATCH] somente buscar L4 --- forest_monitor/stac_compose/business.py | 15 +++++++++++++-- 1 file changed, 13 insertions(+), 2 deletions(-) diff --git a/forest_monitor/stac_compose/business.py b/forest_monitor/stac_compose/business.py index 55954cc..145664d 100644 --- a/forest_monitor/stac_compose/business.py +++ b/forest_monitor/stac_compose/business.py @@ -67,8 +67,19 @@ def search_kepler_stac(cls, url, collection, bbox, time=False): response = StacComposeServices.search_items(url, collection.upper(), query) if not response: return [] - return response['features'] if response.get('features') else [response] - + #retornar somente parametros L4 + features = response['features'] if response.get('features') else [response] + listL4 = [] + padrao = "L4" + for i in features: + + if padrao in i['id']: + #print(i['id']) + listL4.append(i) + + return listL4 + + @classmethod def search(cls, collections, bbox, cloud_cover=False, time=False, limit=100):