Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
GeoSentinel
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Mario Chirinos Colunga
GeoSentinel
Commits
b6d7b956
Commit
b6d7b956
authored
May 08, 2019
by
Mario Chirinos Colunga
💬
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
L1C fix
parent
b45443e5
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
17 additions
and
4 deletions
+17
-4
findProducts.py
geosentinel/findProducts.py
+17
-4
No files found.
geosentinel/findProducts.py
View file @
b6d7b956
...
...
@@ -68,16 +68,29 @@ def main(argv):
L2ADir
=
cfg
[
"productsDir"
]
+
"L2A/"
if
cfg
[
"productLevel"
]
==
"L1C"
:
fileNamesL2A
=
[
productList
[
k
][
'filename'
]
.
replace
(
"SAFE"
,
"zip"
)
.
replace
(
"L1C"
,
"L2A"
)
for
k
in
productList
.
keys
()
]
L1CDir
=
os
.
listdir
(
cfg
[
"productsDir"
]
+
"L1C/"
)
L1CDir
=
cfg
[
"productsDir"
]
+
"L1C/"
linksDir
=
cfg
[
"projectDir"
]
+
"L1C/"
if
not
os
.
path
.
exists
(
linksDir
):
os
.
mkdir
(
linksDir
)
L1CDirList
=
os
.
listdir
(
L1CDir
)
#LinkProducts
fileNames
=
[
productList
[
k
][
'filename'
]
.
replace
(
"SAFE"
,
"zip"
)
for
k
in
productList
.
keys
()
]
matchingProducts
=
set
(
fileNames
)
.
intersection
(
set
(
L1CDirList
))
for
f
in
matchingProducts
:
print
(
f
)
print
(
"ln -s "
+
L1CDir
+
f
+
" "
+
linksDir
+
f
)
os
.
system
(
"ln -s "
+
L1CDir
+
f
+
" "
+
linksDir
+
f
)
print
(
str
(
len
(
matchingProducts
))
+
" Linked to "
+
linksDir
)
matchingProducts
=
set
(
fileNames
)
.
intersection
(
set
(
L1CDir
))
print
(
str
(
len
(
matchingProducts
))
+
" of "
+
str
(
len
(
fileNames
))
+
" L1C products found in L2A."
)
text
=
""
while
text
!=
"yes"
and
text
!=
"no"
:
text
=
raw_input
(
"Do you want to
download this products
to "
+
downloadDir
+
" ? (yes, no)"
)
text
=
raw_input
(
"Do you want to
convert this products and save them
to "
+
downloadDir
+
" ? (yes, no)"
)
if
text
==
"yes"
:
#print("L1CProductListToL2A.sh "+rawDir+" "+inDir+" 1")
os
.
system
(
"L1CProductListToL2A.sh "
+
L1C
Dir
+
" "
+
L2ADir
+
" 1"
)
os
.
system
(
"L1CProductListToL2A.sh "
+
links
Dir
+
" "
+
L2ADir
+
" 1"
)
text
=
""
linksDir
=
cfg
[
"projectDir"
]
+
"L2A/"
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment