EOX GitLab Instance
Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
V
VS
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Deploy
Releases
Container Registry
Model registry
Monitor
Incidents
Service Desk
Analyze
Value stream analytics
Contributor analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Terms and privacy
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
ESA
PRISM
VS
Commits
35808df8
Commit
35808df8
authored
4 years ago
by
Lubomir Dolezal
Browse files
Options
Downloads
Patches
Plain Diff
fix typo, fix calc step no_data set
parent
d841d0be
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
preprocessor/preprocessor/preprocess.py
+2
-2
2 additions, 2 deletions
preprocessor/preprocessor/preprocess.py
preprocessor/preprocessor/steps/calc.py
+2
-2
2 additions, 2 deletions
preprocessor/preprocessor/steps/calc.py
with
4 additions
and
4 deletions
preprocessor/preprocessor/preprocess.py
+
2
−
2
View file @
35808df8
...
...
@@ -199,10 +199,10 @@ def preprocess_file(config: dict, file_path: os.PathLike, use_dir: os.PathLike=N
logger
.
info
(
'
Running preprocessing step %s
'
%
step
)
os
.
mkdir
(
step
)
prepr
p
ocessor
=
STEP_FUNCTIONS
[
step
]
preprocessor
=
STEP_FUNCTIONS
[
step
]
with
Timer
()
as
step_timer
:
prepr
p
ocessor
(
previous_step
,
step
,
**
step_config
)
preprocessor
(
previous_step
,
step
,
**
step_config
)
logger
.
info
(
'
Finished preprocessing step %s after %f seconds.
'
...
...
This diff is collapsed.
Click to expand it.
preprocessor/preprocessor/steps/calc.py
+
2
−
2
View file @
35808df8
...
...
@@ -26,7 +26,7 @@ def calc_step(source_dir: os.PathLike, target_dir: os.PathLike, formulas: List[d
if
isfile
(
target_filename
):
logger
.
warn
(
'
Calc output filename %s already exists
'
%
target_filename
)
calc_formula
(
source_dir
,
item
[
'
inputs
'
],
target_filename
,
item
[
'
formula
'
],
item
.
get
(
'
data_type
'
,
'
Float32
'
))
calc_formula
(
source_dir
,
item
[
'
inputs
'
],
target_filename
,
item
[
'
formula
'
],
item
.
get
(
'
data_type
'
,
'
Float32
'
)
,
item
.
get
(
'
nodata_value
'
,
None
)
)
# take all original files with from the last step
for
filename
in
glob
(
'
%s/*
'
%
source_dir
):
...
...
@@ -53,6 +53,6 @@ def calc_formula(source_dir: os.PathLike, inputs: List[dict], target_filename: o
])
if
nodata_value
is
not
None
:
cmd
.
ext
end
(
"
--NoDataValue=%f
"
%
nodata_value
)
cmd
.
app
end
(
"
--NoDataValue=%f
"
%
nodata_value
)
subprocess
.
run
(
cmd
,
stdout
=
subprocess
.
PIPE
,
stderr
=
subprocess
.
PIPE
)
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