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
414ebd0c
Commit
414ebd0c
authored
Sep 10, 2018
by
Mario Chirinos Colunga
💬
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
find products
parent
a7c1c564
Changes
3
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
42 additions
and
20 deletions
+42
-20
APISentinel.pyc
geosentinel/APISentinel.pyc
+0
-0
findProduccts.py
geosentinel/findProduccts.py
+0
-20
findProducts.py
geosentinel/findProducts.py
+42
-0
No files found.
geosentinel/APISentinel.pyc
View file @
414ebd0c
No preview for this file type
geosentinel/findProduccts.py
deleted
100644 → 0
View file @
a7c1c564
#!/usr/bin/python
# -*- coding: utf-8 -*-
import
sys
sys
.
path
.
append
(
'../'
)
from
geosentinel
import
APISentinel
from
datetime
import
date
def
findSentinelProducts
():
def
main
(
argv
):
if
len
(
sys
.
argv
)
==
2
:
print
(
getWKTPolygonBoundingBox
(
argv
[
1
]))
if
len
(
sys
.
argv
)
==
3
:
print
(
getWKTPolygonBoundingBox
(
argv
[
1
],
argv
[
2
]))
if
__name__
==
"__main__"
:
main
(
sys
.
argv
)
geosentinel/findProducts.py
0 → 100644
View file @
414ebd0c
#!/usr/bin/python
# -*- coding: utf-8 -*-
import
sys
,
os
from
contextlib
import
contextmanager
sys
.
path
.
append
(
'../'
)
from
geosentinel
import
APISentinel
from
datetime
import
date
@
contextmanager
def
suppress_stdout
():
with
open
(
os
.
devnull
,
"w"
)
as
devnull
:
old_stdout
=
sys
.
stdout
sys
.
stdout
=
devnull
try
:
yield
finally
:
sys
.
stdout
=
old_stdout
def
findSentinelProducts
(
wkt
,
startDate
,
endDate
,
platform
,
cloud
):
sentinel
=
APISentinel
.
APISentinel
(
'asalazarg'
,
'geo135asg'
)
products
=
sentinel
.
getProducts
(
wkt
,
(
startDate
,
endDate
),
{
"platformname"
:
platform
,
"cloudcoverpercentage"
:
"[0 TO "
+
str
(
cloud
)
+
"]"
})
list
=
[
k
for
k
in
products
.
keys
()]
return
list
def
main
(
argv
):
if
len
(
sys
.
argv
)
!=
6
:
print
(
"Usage"
)
else
:
with
suppress_stdout
():
list
=
findSentinelProducts
(
sys
.
argv
[
1
],
sys
.
argv
[
2
],
sys
.
argv
[
3
],
sys
.
argv
[
4
],
sys
.
argv
[
5
])
for
l
in
list
:
print
l
if
__name__
==
"__main__"
:
main
(
sys
.
argv
)
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