I am creating a QgsRectangle like this:
llc = QgsPointXY(319660,4624088) # lower left corner in UTM
urc = QgsPointXY(396425,4742843) # upper right corner in UTM
aoi = QgsRectangle(llc,urc)
But how do I tell him the correct crs of these points? Can I pass the EPSG somehow?
QgsPointXYclass creates a point either from another point or from x,y coordinates. If you need you can reproject as shown here: https://gis.stackexchange.com/questions/349585/reprojecting-qgspointxy or here: https://docs.qgis.org/3.22/en/docs/pyqgis_developer_cookbook/crs.html#crs-transformation – Taras Dec 07 '21 at 08:41QgsRasterCalculator('ras@1', output, 'GTiff', aoi, 15353, 23751, entries)– PDistl Dec 07 '21 at 08:48