Skip to content
Snippets Groups Projects
Commit f76ec999 authored by edupin's avatar edupin
Browse files

corrected ingestData

parent 3f008b2f
No related branches found
No related tags found
No related merge requests found
......@@ -6,12 +6,14 @@ user_id=
# The path of the data (e.g. /projects/myProject/output/output_data_example.tiff). mandatory
data_path=
# The format of the data (e.g. AZ, RG, DEM,ROI, SLC_HH, SLC_VV, SLC_VH, SLC_HV, INC, KZ). mandatory
data_format=
# The format of the data (e.g. AZ, RG, DEM,ROI, SLC, INC, KZ, L2, OTHER). mandatory
product_type=
#OPTIONAL FIELDS
# Name of sub-region (e.g. paracou, ...). optional
# Name of sub-region (e.g. La Lope, ...). optional
sub_region_name=
# Raster Data polarization (e.g. HH, HV, VV, VH). optional
......
......@@ -50,13 +50,13 @@ def ingestPrivateData(propertiesPath):
except:
pass
try :
data_format = data_criteria['data_format']
if len(data_format) > 0:
criteria_list['dataFormat'] = data_format
print(' 2.3- The data format is '+ data_format)
product_type = data_criteria['product_type']
if len(product_type) > 0:
criteria_list['dataFormat'] = product_type
print(' 2.3- The product type is '+ product_type)
else:
allVariableAreFilled = False;
print(' 2.3- The data format is mandatory')
print(' 2.3- The product type is mandatory')
except:
pass
......@@ -176,6 +176,12 @@ def ingestTheData(criteria_list, destination):
print('destination')
url = url_root + "catalogue/granule/private/add?dataPath=" + destination + "&dataFormat=" + criteria_list['dataFormat'] + "&userId=" + str(criteria_list['userId'])
print(url)
if criteria_list['subregionName']
url = url+ "&subregionName=" + criteria_list['subregionName']
if criteria_list['polarization']
url = url+ "&polarization=" + criteria_list['polarization']
print(url)
#"&subregionName=" + criteria_list['subregionName'] +
#+ "&polarization=" +criteria_list['polarization']
response = requests.get(url)
......
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