EOX GitLab Instance

Skip to content
Snippets Groups Projects
Commit 35808df8 authored by Lubomir Dolezal's avatar Lubomir Dolezal
Browse files

fix typo, fix calc step no_data set

parent d841d0be
No related branches found
No related tags found
No related merge requests found
......@@ -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)
preprpocessor = STEP_FUNCTIONS[step]
preprocessor = STEP_FUNCTIONS[step]
with Timer() as step_timer:
preprpocessor(previous_step, step, **step_config)
preprocessor(previous_step, step, **step_config)
logger.info(
'Finished preprocessing step %s after %f seconds.'
......
......@@ -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.extend("--NoDataValue=%f" % nodata_value)
cmd.append("--NoDataValue=%f" % nodata_value)
subprocess.run(cmd, stdout=subprocess.PIPE, stderr=subprocess.PIPE)
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment