Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
T
Theia stack
Manage
Activity
Members
Labels
Plan
Issues
0
Issue boards
Milestones
Wiki
Code
Merge requests
1
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package Registry
Container Registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
esa-common
che7
stacks
Theia stack
Commits
f76ec999
Commit
f76ec999
authored
5 years ago
by
edupin
Browse files
Options
Downloads
Patches
Plain Diff
corrected ingestData
parent
3f008b2f
No related branches found
Branches containing commit
No related tags found
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
Project_template/conf/sharedata.properties
+5
-3
5 additions, 3 deletions
Project_template/conf/sharedata.properties
ingestData.py
+11
-5
11 additions, 5 deletions
ingestData.py
with
16 additions
and
8 deletions
Project_template/conf/sharedata.properties
+
5
−
3
View file @
f76ec999
...
...
@@ -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
...
...
This diff is collapsed.
Click to expand it.
ingestData.py
+
11
−
5
View file @
f76ec999
...
...
@@ -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
)
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment