Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
GeoInt_SIDT
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
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Mario Chirinos Colunga
GeoInt_SIDT
Commits
1d5848e1
Commit
1d5848e1
authored
Sep 10, 2018
by
Mario Chirinos Colunga
💬
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
findproducts
parent
ee1d425d
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
10 additions
and
4 deletions
+10
-4
findProducts.py
catalog/management/commands/findProducts.py
+10
-4
No files found.
catalog/management/commands/findProd
cu
ts.py
→
catalog/management/commands/findProd
uc
ts.py
View file @
1d5848e1
...
...
@@ -4,17 +4,23 @@
from
catalog.models
import
Product_l1c
,
Product_l2a
sys
.
path
.
append
(
'../'
)
from
geosentinel
import
APISentinel
,
polygonToBox
from
geosentinel
import
APISentinel
,
polygonToBox
,
findProducts
class
Command
(
BaseCommand
):
def
add_arguments
(
self
,
parser
):
parser
.
add_argument
(
'products'
,
nargs
=
1
,
type
=
str
)
parser
.
add_argument
(
'wtk'
,
nargs
=
1
,
type
=
str
)
parser
.
add_argument
(
'startdate'
,
nargs
=
2
,
type
=
str
)
parser
.
add_argument
(
'enddate'
,
nargs
=
3
,
type
=
str
)
parser
.
add_argument
(
'platform'
,
nargs
=
4
,
type
=
str
)
parser
.
add_argument
(
'cloud'
,
nargs
=
5
,
type
=
str
)
def
handle
(
self
,
*
args
,
**
options
):
options
[
'products'
]
products
=
options
[
'products'
]
.
split
()
# options['products']
# products = options['products'].split()
products
=
findProducts
.
findSentinelProducts
(
options
[
'wkt'
],
options
[
'startDate'
],
options
[
'endDate'
],
options
[
'platform'
],
options
[
'cloud'
])
pl1c
=
Product_l1c
.
objects
.
all
()
.
filter
(
identifier_in
=
products
)
pl2a
=
Product_l1c
.
objects
.
all
()
.
filter
(
identifier_in
=
pl1c
)
...
...
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