diff --git a/TimeSeries/s1planetary.py b/TimeSeries/s1planetary.py index 28e04c2685f4fd36684e5ef2a3a85b013e3eb0eb..010734fd215b45eb50149e73038ce65b428d1197 100644 --- a/TimeSeries/s1planetary.py +++ b/TimeSeries/s1planetary.py @@ -11,9 +11,10 @@ import otbApplication as otb import json from Common.geotools import get_query_bbox -def fetch(shp, dt, output_fld, api_key, direction=None): +def fetch(shp, dt, output_fld, api_key=None, direction=None): - os.environ['PC_SDK_SUBSCRIPTION_KEY'] = api_key + if api_key is not None: + os.environ['PC_SDK_SUBSCRIPTION_KEY'] = api_key bbox, i_bbox, shp_srs = get_query_bbox(shp, return_all=True) api = Client.open('https://planetarycomputer.microsoft.com/api/stac/v1', modifier=PC.sign_inplace) diff --git a/Workflows/operations.py b/Workflows/operations.py index a861c2e0f8dd5720a7391e5ed0f13683377c9026..3117b65d0afa16524df25486f5e014d473a7d55c 100644 --- a/Workflows/operations.py +++ b/Workflows/operations.py @@ -106,8 +106,9 @@ def preprocess_s1(in_fld, roi, out_fld, dem_fld=None, geoid=None, direction=None def fetch(imagery, shp, out_fld, dt=None, auth=None, only_tiles=None): assert(imagery in ['s2theia', 's2planetary', 's1grd', 's1rtc', 'planetmosaics', 'cop-dem-glo-30', 'nasadem', 'landsatplanetary']) - if imagery not in ['s2planetary', 'cop-dem-glo-30', 'nasadem'] and auth is None: - raise ValueError("Please provide authentication information.") + # Seems that Planetary don't need api _keys anymore + #if imagery not in ['s2planetary', 'cop-dem-glo-30', 'nasadem'] and auth is None: + # raise ValueError("Please provide authentication information.") if imagery not in ['cop-dem-glo-30', 'nasadem'] and dt is None: raise ValueError("Please provide date range option.") if imagery == 's2theia':