I would like to overlap 2 raster files(.JP2/ECW) where images are captured from the same place but just with a little time difference. When I try to overlap the images by moving and rotating, QGIS rotates the whole canvas, so I could not move or rotate single raster layer. I tried the folllowing python code for this job:
from osgeo import gdal, osr layer = iface.activeLayer() provider = layer.dataProvider() path = provider.dataSourceUri() dataset = gdal.Open(path) geotransform = dataset.GetGeoTransform() gt = list(geotransform) gt = 500 gt = 500 gt = 3 #x pixel rotation gt = 3 #y pixel rotation dataset.SetGeoTransform(tuple(gt)) dataset = None
but it does not update the current map on the canvas.