<div dir="ltr">

<p class="MsoNormal">Hi, when I import a processing script in the QGIS Python
console (see parts of it below), it does not give any error and even displays
("Executing algorithm xy"). However, the output file is not
generated, i.e., there is no file in the output directory. Does anyone know
why? Do I need to save raster output files differently? I also tried by
hardcoding the filepath (resampled = "C:/result.tif").</p>

<p class="MsoNormal"> </p>

<p class="MsoNormal"> </p>

<p class="MsoNormal"># Define name of resampled raster<span>   </span></p>

<p class="MsoNormal">resampled = str(os.path.splitext(f)[0] + "_" +
str(j) + "pixels.tif")</p>

<p class="MsoNormal"> </p>

<p class="MsoNormal"># Run resampling of raster <br></p>

<p class="MsoNormal">processing.runalg('gdalogr:translate',{"INPUT":rlayer,
"OUTSIZE":j, "OUTSIZE_PERC":False, "EXPAND":2,
"PROJWIN":"%f,%f,%f,%f" % (xmin, xmax, ymin, ymax),
"OUTPUT":resampled})</p>

<p class="MsoNormal"> </p>

<p class="MsoNormal"> </p>

<p class="MsoNormal"># Define name of tiled raster</p>

<p class="MsoNormal">tiled = str(os.path.splitext(f)[0] + "_" + str(j)
+ "pixels" + "_tiling_x" + str(l+1) + "y" +
str(k) + ".tif")</p>

<p class="MsoNormal"><span>                   </span></p>

<p class="MsoNormal"># Run tiling of raster</p>

<p class="MsoNormal">processing.runalg('gdalogr:cliprasterbyextent',
{"INPUT":reslayer, "PROJWIN":"%f,%f,%f,%f" %
(t_xmin,t_xmax,t_ymin,t_ymax), "OUTPUT":tiled})</p>

<p class="MsoNormal"> </p>

<p class="MsoNormal"> </p>

<p class="MsoNormal">Thank you,</p>

<p class="MsoNormal">Sophie</p>

</div>