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
05009680
Commit
05009680
authored
Apr 21, 2018
by
Adan Salazar Garibay
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
cleaning code
parent
52cb9e49
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
4 additions
and
39 deletions
+4
-39
download_images
examples/download_images
+1
-1
find_sentinel_files
examples/find_sentinel_files
+2
-2
ui_utils.py
geosentinel/ui_utils.py
+1
-36
No files found.
examples/download_images
View file @
05009680
...
...
@@ -23,7 +23,7 @@ Example of dowloading Sentinel images from the Copernicus Open Access Hub < http
"""
from
sentinelsat.sentinel
import
read_geojson
,
geojson_to_wkt
from
argparse
import
ArgumentParser
from
geosentinel.ui_utils
import
download_sentinel_mages
from
geosentinel.ui_utils
import
(
download_sentinel_mages
)
from
geosentinel.arguments
import
SENTINEL_ARGUMENTS
def
main
():
...
...
examples/find_sentinel_files
View file @
05009680
...
...
@@ -23,7 +23,7 @@ Example of finding Sentinel files in a specific directory
"""
from
argparse
import
ArgumentParser
from
geosentinel.ui_utils
import
find_files
from
geosentinel.ui_utils
import
(
find_files_Sentinel
)
from
geosentinel.arguments
import
SENTINEL_FIND_ARGUMENTS
def
main
():
...
...
@@ -40,7 +40,7 @@ def main():
args
=
parser
.
parse_args
()
list_files
=
find_files
(
args
)
list_files
=
find_files
_Sentinel
(
args
)
print
"There is/are
%
d "
%
len
(
list_files
)
+
args
.
plattform
+
" file(s)"
...
...
geosentinel/ui_utils.py
View file @
05009680
...
...
@@ -35,7 +35,7 @@ Functions:
"""
from
argparse
import
ArgumentParser
#
from argparse import ArgumentParser
import
os
,
sys
import
zipfile
...
...
@@ -49,41 +49,6 @@ from sentinelsat.sentinel import SentinelAPI #read_geojson, geojson_to_wkt
from
geosentinel.products
import
SentinelData
#from Sentinel.exceptions import ImageNotFoundError
#: Command line arguments for collecting information about Sentinel data and products
SENTINEL_ARGUMENTS
=
ArgumentParser
(
add_help
=
False
)
SENTINEL_ARGUMENTS
.
add_argument
(
"init_date"
,
help
=
"initial date for dowloading period."
)
SENTINEL_ARGUMENTS
.
add_argument
(
"end_date"
,
help
=
"final date for dowloading period."
)
SENTINEL_ARGUMENTS
.
add_argument
(
"product_type"
,
help
=
"sentinel product type {SLC, GRD, IW }"
)
SENTINEL_ARGUMENTS
.
add_argument
(
"plattform"
,
help
=
"sentinel-1 or sentinel-2"
)
SENTINEL_ARGUMENTS
.
add_argument
(
"overlap"
,
type
=
int
,
help
=
"Percentage of overlapping between the polygon "
"provided by the user and the polygon of the image"
)
SENTINEL_ARGUMENTS
.
add_argument
(
"output_folder"
,
help
=
"Folder to download Sentinel files "
)
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_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 Sentinel-2"
)
SENTINEL_UNZIP_ARGUMENTS
.
add_argument
(
"product_type"
,
help
=
"sentinel product type {all, 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
check_existing_productType
(
product
,
flag
):
if
(
flag
==
1
):
plattform
=
[
'Sentinel-1'
,
'sentinel-1'
,
'Sentinel-2'
,
'sentinel-2'
]
...
...
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