Is there a processing algorithm in the pyqgis API for assigning a projection to a raster (GeoTIFF)?
I am clipping a GeoTIFF with a selected feature of a vector layer (shapefile). Both are projected in GDA94/MGA Zone 55. The QGIS project is set for the same projection. The result is defaulting to WGS84 for some reason, but not projecting to WGS84. It is holding the GDA94/MGA Zone 55 coordinates. I need to make sure the output is also in GDA94/MGA Zone 55 before progressing to the next step of the program.
I am running this in QGIS 2.14. I ran it two years back in QGIS 2.8 and I got the same projection in the output as I had in the input. I have tried manually running "Raster... Projections... Assign Projections" on the input raster before the clip, to make certain the input is georeferenced in a "QGIS friendly" manner. No luck. Here is the clipping algorithm I am running.
processing.runalg("saga:clipgridwithpolygon", veg_raster_for_clip, selected, outraster)