Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
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
6bac800d
Commit
6bac800d
authored
Apr 21, 2018
by
Pedro Alfonso Ramirez
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Add unzip
parent
05009680
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
13 additions
and
14 deletions
+13
-14
ui_utils.py
geosentinel/ui_utils.py
+13
-14
No files found.
geosentinel/ui_utils.py
View file @
6bac800d
...
...
@@ -51,8 +51,8 @@ from geosentinel.products import SentinelData
def
check_existing_productType
(
product
,
flag
):
if
(
flag
==
1
):
p
lattform
=
[
'Sentinel-1'
,
'sentinel-1'
,
'Sentinel-2'
,
'sentinel-2'
]
findProduct
=
product
in
p
lattform
p
roduct_type
=
[
'Sentinel-1'
,
'sentinel-1'
,
'Sentinel-2'
,
'sentinel-2'
]
findProduct
=
product
in
p
roduct_type
if
not
findProduct
:
print
product
+
" not exist"
sys
.
exit
()
...
...
@@ -64,24 +64,23 @@ def check_existing_productType(product,flag):
sys
.
exit
()
def
find_files_Sentinel
(
args
):
folder
=
args
.
folder
satellite
=
args
.
plattform
product_typ
=
args
.
product_type
check_existing_directory
(
folder
,
2
)
check_existing_productType
(
satellite
,
1
)
check_existing_productType
(
product_typ
,
2
)
check_existing_directory
(
args
.
folder
,
2
)
check_existing_productType
(
args
.
satellite
,
1
)
check_existing_productType
(
args
.
product_typ
,
2
)
files
=
os
.
listdir
(
folder
)
if
(
args
.
product_type
==
"all"
):
namfil1
=
'S1A_'
namfil2
=
'S1B_'
namfil3
=
'S2A_'
namfil4
=
'S2B_'
if
args
.
satellite
==
'Sentinel-1'
or
args
.
satellite
==
'sentinel-1'
:
namfil1
=
'S1A_'
namfil2
=
'S1B_'
if
args
.
satellite
==
'Sentinel-2'
or
args
.
satellite
==
'sentinel-2'
:
namfil3
=
'S2A_'
namfil4
=
'S2B_'
files
=
[
f
for
f
in
files
if
f
.
startswith
(
namfil1
)
or
f
.
startswith
(
namfil2
)
or
f
.
startswith
(
namfil3
)
or
f
.
startswith
(
namfil4
)]
else
:
if
(
satellite
==
"Sentinel-1"
)
or
(
satellite
==
"sentinel-1"
)
:
if
args
.
satellite
==
"Sentinel-1"
or
args
.
satellite
==
"sentinel-1"
:
namfil1
=
'S1A_'
+
args
.
product_type
namfil2
=
'S1B_'
+
args
.
product_type
if
(
satellite
==
"Sentinel-2"
)
or
(
satellite
==
"sentinel-2"
)
:
if
args
.
satellite
==
"Sentinel-2"
or
args
.
satellite
==
"sentinel-2"
:
namfil1
=
'S2A_'
+
args
.
product_type
namfil2
=
'S2B_'
+
args
.
product_type
files
=
[
f
for
f
in
files
if
f
.
startswith
(
namfil1
)
or
f
.
startswith
(
namfil2
)]
...
...
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