Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
Sen2Chain
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package Registry
Container Registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
ESPACE-DEV
Sen2Chain
Commits
485472a5
Commit
485472a5
authored
5 years ago
by
pascal.mouquet_ird.fr
Browse files
Options
Downloads
Plain Diff
Merge branch 'master' of framagit.org:jebins/sen2chain
parents
4705f78c
3804104c
No related branches found
Branches containing commit
No related tags found
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
script_examples/process_l2a_and_products.py
+39
-0
39 additions, 0 deletions
script_examples/process_l2a_and_products.py
with
39 additions
and
0 deletions
script_examples/process_l2a_and_products.py
0 → 100644
+
39
−
0
View file @
485472a5
# -*- coding:utf-8 -*-
#~ Starts processing on L1C that have been downloaded
#~ but have not been processed
#~ More examples and details on the sen2chain wiki : https://framagit.org/jebins/sen2chain/wikis/Home
from
sen2chain
import
Tile
,
L1cProduct
,
L2aProduct
def
process_missings
(
tile
):
"""
Processing function
"""
t
=
Tile
(
tile
)
for
p
in
t
.
l2a_missings
:
l1c
=
L1cProduct
(
p
.
identifier
,
t
.
name
)
try
:
l1c
.
process_l2a
()
except
:
print
(
"
FAILED:
"
,
p
.
identifier
)
continue
for
p
in
t
.
l2a
:
l2a
=
L2aProduct
(
p
.
identifier
,
t
.
name
)
try
:
l2a
.
process_cloud_mask_v2
()
#~ list of indices to be caculated (available : NDVI/NDWIGAO/NDWIMCF/BIGR/BIRNIR/BIBG),
#~ And calculation of clouds_nodata (True/False) and quicklook (True/False)
l2a
.
process_indices
([
"
NDVI
"
,
"
NDWIGAO
"
,
"
NDWIMCF
"
,
"
MNDWI
"
],
True
,
True
)
except
:
print
(
"
FAILED:
"
,
p
.
identifier
)
continue
# list of tiles to be processed (Reunion Island example)
tiles
=
[
"
40KCB
"
]
for
t
in
tiles
:
print
(
"
Processing:
"
,
t
)
process_missings
(
t
)
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment