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
ea55ecf9
Commit
ea55ecf9
authored
May 18, 2018
by
geoint
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
filter
parent
3e9f8efc
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
15 additions
and
3 deletions
+15
-3
downloadTest.py
examples/downloadTest.py
+7
-0
APISentinel.py
geosentinel/APISentinel.py
+8
-3
APISentinel.pyc
geosentinel/APISentinel.pyc
+0
-0
No files found.
examples/downloadTest.py
View file @
ea55ecf9
...
@@ -9,4 +9,11 @@ area = "POLYGON((-89.79030210118333 21.122657323983717,-89.77308220413153 21.122
...
@@ -9,4 +9,11 @@ area = "POLYGON((-89.79030210118333 21.122657323983717,-89.77308220413153 21.122
footprint
=
"Intersects(POLYGON((-89.79030210118333 21.122657323983717,-89.77308220413153 21.122657323983717,-89.77308220413153 21.140540053466538,-89.79030210118333 21.140540053466538,-89.79030210118333 21.122657323983717)))"
footprint
=
"Intersects(POLYGON((-89.79030210118333 21.122657323983717,-89.77308220413153 21.122657323983717,-89.77308220413153 21.140540053466538,-89.79030210118333 21.140540053466538,-89.79030210118333 21.122657323983717)))"
products
=
sentinel
.
getProducts
(
area
,
(
'20150101'
,
'20180517'
),
{
"platformname"
:
"Sentinel-2"
,
"cloudcoverpercentage"
:
"[0 TO 10]"
})
products
=
sentinel
.
getProducts
(
area
,
(
'20150101'
,
'20180517'
),
{
"platformname"
:
"Sentinel-2"
,
"cloudcoverpercentage"
:
"[0 TO 10]"
})
print
len
(
products
)
print
len
(
products
)
for
p
in
products
:
print
products
[
p
][
'filename'
]
print
len
(
products
)
products
=
sentinel
.
filterProducts
(
products
)
for
p
in
products
:
print
products
[
p
][
'filename'
]
print
len
(
products
)
#sentinel.downloadProducts(products,dir)
#sentinel.downloadProducts(products,dir)
geosentinel/APISentinel.py
View file @
ea55ecf9
...
@@ -82,8 +82,13 @@ class APISentinel(object):
...
@@ -82,8 +82,13 @@ class APISentinel(object):
self
.
api
.
download_all
(
products
)
self
.
api
.
download_all
(
products
)
# def filterProducts(self, products_list, user_footprint, threshold):
def
filterProducts
(
self
,
productList
):
# products_down = OrderedDict()
#, user_footprint, threshold):
products
=
productList
.
copy
()
for
p
in
productList
:
if
productList
[
p
][
'filename'
]
.
find
(
"OPER_PRD"
)
!=
-
1
:
del
products
[
p
]
# products_down = products_list.copy()
# products_down = products_list.copy()
# products_df = self.api.to_dataframe(products_list)
# products_df = self.api.to_dataframe(products_list)
...
@@ -104,6 +109,6 @@ class APISentinel(object):
...
@@ -104,6 +109,6 @@ class APISentinel(object):
# # Deleting element
# # Deleting element
# del products_down[products_df.uuid[i]]
# del products_down[products_df.uuid[i]]
# return products_down
return
products
geosentinel/APISentinel.pyc
View file @
ea55ecf9
No preview for this file type
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