I have set of referenced rasters (.tif), which need to be tiled - but each of them need to be rotated by a certain degree before that using python (gdal mainly as other routines use it as well). In QGIS, for example, I can achieve the right view by changing map rotation value at the bottom right corner of the screen - it does exactly what i want, but does not affect tiling process in any way and can't be done outside of QGIS interface, which is important too.
While using North Pole Azimuthal projection (EPSG:102016) I tried to define custom CRS similar to it, but had no sucess as +alpha and +gamma parameters work only with +omerc projections.
I would be very grateful for pointing me in the right direction. Should i use custom wkt-defined CRS-es or, perhaps, in gdal tiling instrument there is some built-in way for rotating an image..?
P.S. Using azimuthal projection for tiling is kind of weird but it has its purpose. Thanks in advance for your help!
UPDATE: Seems like rotation can be performed by changing affine parameters via gdal.SetGeoTransform. However with formulae provided by @MortenSickel i got following result (1 is raster before changing affines, 2 - after). Btw the order of parameters is different in gdal compared to esri world file and that can lead to errors, but i double-checked that.