I have a script that loops through input raster's creates new raster files and converts these to vector performing a number of additional processes. Ultimately a vector is created that is a modified version of the input raster.
My question is how can I ensure that each new raster and vector created, whether they are a temp file or the final output, maintain the same projection (ESPG 27700)? Is there a command I can add in at the start of each loop or can I set the output projection in each individual process e.g. raster calculator or polygonize. An example line of the script is provide:
out1=processing.runalg('gdalogr:rastercalculator', raster,'1',None,'1',None,'1',None,'1',None,'1',None,'1','A>0',None,5,None,result_shp + "/" + result_name)
Additionally, is it possible to set a snap raster in a similar way and is this something I should consider doing?