From ca7d43962aa0c94631ab42243ef10c1824ebca8c Mon Sep 17 00:00:00 2001 From: "raffaele.gaetano" <raffaele.gaetano@cirad.fr> Date: Thu, 2 Apr 2020 11:09:22 +0200 Subject: [PATCH] FIX: avoid setting no-data value on cloud masks when clipping. --- prepareS2THEIA.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/prepareS2THEIA.py b/prepareS2THEIA.py index 3323f74..b4e128b 100644 --- a/prepareS2THEIA.py +++ b/prepareS2THEIA.py @@ -136,7 +136,8 @@ def prepare(argv): out_fn = od + '/' + os.path.splitext(os.path.basename(fn))[0] + '_' + ext + '.tif' subprocess.call(clip_cmd + '\"' + fn + '\" \"' + out_fn + '\"', shell=True) - clip_cmd = 'gdalwarp -q -of GTiff -ot UInt16 -dstnodata 0 -srcnodata 0 -cutline \"' + clip_shp_val + '\" -crop_to_cutline ' + # clip_cmd = 'gdalwarp -q -of GTiff -ot UInt16 -dstnodata 0 -srcnodata 0 -cutline \"' + clip_shp_val + '\" -crop_to_cutline ' + clip_cmd = 'gdalwarp -q -of GTiff -ot UInt16 -cutline \"' + clip_shp_val + '\" -crop_to_cutline ' if srs != None : clip_cmd += '-t_srs {} '.format(srs) fns = ['CLM_R1', 'CLM_R2'] -- GitLab