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
9f209e69
Commit
9f209e69
authored
Apr 20, 2018
by
Pedro Alfonso Ramirez
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Add unzip
parent
a065bda4
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
11 additions
and
11 deletions
+11
-11
ui_utils.py
geosentinel/ui_utils.py
+11
-11
No files found.
geosentinel/ui_utils.py
View file @
9f209e69
...
...
@@ -36,7 +36,7 @@ Functions:
from
argparse
import
ArgumentParser
import
os
import
zipfile
from
collections
import
OrderedDict
...
...
@@ -71,31 +71,31 @@ SENTINEL_FIND_ARGUMENTS = ArgumentParser(add_help=False)
SENTINEL_FIND_ARGUMENTS
.
add_argument
(
"folder"
,
help
=
"Folder to find Sentinel files "
)
SENTINEL_FIND_ARGUMENTS
.
add_argument
(
"plattform"
,
help
=
"sentinel-1 or sentinel-2"
)
SENTINEL_FIND_ARGUMENTS
.
add_argument
(
"plattform"
,
help
=
"Sentinel-1 or Sentinel-2"
)
SENTINEL_UNZIP_ARGUMENTS
=
ArgumentParser
(
add_help
=
False
)
SENTINEL_UNZIP_ARGUMENTS
.
add_argument
(
"folder"
,
help
=
"Folder to find Sentinel files"
)
SENTINEL_UNZIP_ARGUMENTS
.
add_argument
(
"plattform"
,
help
=
"
sentinel-1 or s
entinel-2"
)
SENTINEL_UNZIP_ARGUMENTS
.
add_argument
(
"plattform"
,
help
=
"
Sentinel-1 or S
entinel-2"
)
SENTINEL_UNZIP_ARGUMENTS
.
add_argument
(
"product_type"
,
help
=
"sentinel product type {SM_SLC, SM_GRDF, SM_GRDH, SM_GRDM, IW_SLC, IW_GRDH, IW_GDRM, EW_SLC, EW_GRDH, EW_GRDM, WV_SLC, WV_GRDM, MSIL1C, OPER_PRD }"
)
def
find_files
(
args
):
folder
=
args
.
folder
satelite
=
args
.
plattform
files
=
os
.
listdir
(
folder
)
if
(
satelite
==
"Sentinel-1"
):
namfil1
=
'S1A_'
namfil2
=
'S1B_'
files
=
[
f
for
f
in
files
if
f
.
startswith
(
namfil1
)
or
f
.
startswith
(
namfil2
)]
namfil1
=
'S1A_'
+
args
.
product_type
namfil2
=
'S1B_'
+
args
.
product_type
if
(
satelite
==
"Sentinel-2"
):
namfil1
=
'S2A_'
namfil2
=
'S2B_'
files
=
[
f
for
f
in
files
if
f
.
startswith
(
namfil1
)
or
f
.
startswith
(
namfil2
)]
namfil1
=
'S2A_'
+
args
.
product_type
namfil2
=
'S2B_'
+
args
.
product_type
files
=
[
f
for
f
in
files
if
f
.
startswith
(
namfil1
)
or
f
.
startswith
(
namfil2
)]
if
(
len
(
files
)
==
0
):
print
"Files not found..."
return
files
def
unzip
(
list_files
,
args
):
...
...
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