I'm using GDAL to georeference an image, but can't seem to find the information that I need.
In the sample code below the upper left (ul) and lower right (lr) corner coordinates denote not the corners of the image itself, but the corners of the bounding-box that span the image once it's been rotated around its midpoint (rotation).
I believe I've managed to translate the image as if these coordinates were its corners but that's not quite right. I could proceed by deducing the image corner coordinates and go from there but I'm hoping there's a way to let GDAL figure this out for me.
Is there some way I can feed GDAL with bounding-box coordinates and rotation like this?
import gdal ul = (18.019981384277344, 59.32425764439889) lr = (18.103408813476562, 59.30586128759598) rotation = -181.46 # what I need to include somehow ds = gdal.Open('img.bmp') gdal.Translate( 'img.tiff', ds, outputBounds=[*ul, *lr], outputSRS='EPSG:4326', )