Commit 0465cb36 authored by Gaetano Raffaele's avatar Gaetano Raffaele
Browse files

WIP: cannot remove files under Windows during processing.

parent 3cceec86
......@@ -492,8 +492,8 @@ class LandscapeStratification(QgsProcessingAlgorithm):
processing.run('otb:ManageNoData', ND_app_parameters, context=context, feedback=feedback)
setNoDataValue(LS_Strat, ndv)
os.remove(LS_Strat_pre)
os.remove(LS_Strat_norm)
#os.remove(LS_Strat_pre)
#os.remove(LS_Strat_norm)
GRM_output_pre = os.path.join(tmp_folder,prefix+"LandStrat_map_pre.tif")
GRM_app_parameters = {'in':LS_Strat, 'threshold':float(threshold), 'criterion':'bs', 'out':GRM_output_pre}
......@@ -508,7 +508,7 @@ class LandscapeStratification(QgsProcessingAlgorithm):
'outcontext': os.path.join(output_folder, "outcontext.txt")}
processing.run("otb:BandMathX", BMX_parameters, context=context, feedback=feedback)
os.remove(os.path.join(output_folder, "outcontext.txt"))
os.remove(GRM_output_pre)
#os.remove(GRM_output_pre)
setNoDataValue(GRM_output, 0)
GRM_vec_output = os.path.join(output_folder,prefix+"LandscapeStratification.shp")
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment