<div dir="ltr"><div class="gmail_quote"><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">Date: Fri, 10 Mar 2023 13:52:42 +0000<br>
From: Daniel Evans <<a href="mailto:daniel.fred.evans@gmail.com" target="_blank">daniel.fred.evans@gmail.com</a>><br>
To: <a href="mailto:qgis-user@lists.osgeo.org" target="_blank">qgis-user@lists.osgeo.org</a><br>
Subject: [Qgis-user] Display of non-axis-aligned pixels<br>
Message-ID:<br>
        <<a href="mailto:CANnaQaY0-e_Hio8dww88ZO-aHi4gsjSmTeRLbE0dtH_XqPsXeA@mail.gmail.com" target="_blank">CANnaQaY0-e_Hio8dww88ZO-aHi4gsjSmTeRLbE0dtH_XqPsXeA@mail.gmail.com</a>><br>
Content-Type: text/plain; charset="UTF-8"<br>
<br>
Hello,<br>
<br>
I have some raster data where the pixels are not<br>
coordinate-system-aligned - i.e. the geotransform has significant<br>
diagonal components. `gdalinfo` reports:<br>
<br>
GeoTransform =<br>
  444048.6420808117, 6.302162394202463, 6.152691784443768<br>
  5417729.777950762, 4.143808265940849, -3.26376570161891<br>
<br>
When viewing the raster in QGIS, I am surprised to find that it<br>
displays the pixels as north-aligned. An example is here:<br>
<a href="https://i.imgur.com/i6y1gtM.png" rel="noreferrer" target="_blank">https://i.imgur.com/i6y1gtM.png</a><br>
<br>
If I make nodata visible, it seems that QGIS is displaying an<br>
axis-aligned image corresponding to the bounding box of my original<br>
image (data in white, nodata in black). Screenshot here:<br>
<a href="https://i.imgur.com/ZQJ6Mi5.png" rel="noreferrer" target="_blank">https://i.imgur.com/ZQJ6Mi5.png</a><br>
<br>
This behaviour surprised me, as QGIS is capable of showing pixels at a<br>
slant in some circumstances. For example, if I set QGIS to render<br>
using a different UTM zone, the pixels are slanted - although in this<br>
case, it's applying a second rotation on top of the north-aligning<br>
rotation it's already applying: <a href="https://i.imgur.com/LoC7jyk.png" rel="noreferrer" target="_blank">https://i.imgur.com/LoC7jyk.png</a><br>
<br>
1. Is it possible to have QGIS display a raster without resampling the<br>
pixels to axis-aligned?<br></blockquote><div><br></div><div>I don't believe so.</div><div> </div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">
2. Is there a reason for making this the default (or only) behaviour?<br>
It caused quite some confusion when trying to diagnose a<br>
geotransform-related issue elsewhere.<br></blockquote><div><br></div><div>Several bug reports have been filed about this over the years, (e.g. <a href="https://github.com/qgis/QGIS/issues/23760">https://github.com/qgis/QGIS/issues/23760</a>, which should really be reopened, unless someone files a new ticket instead), and no one has ever tried to say it "should" be this way.  I'm no expert, but I presume the problem is simply that no one has been both motivated and able to do the work to fix it, or to fund someone to do it.<br>I'm not even sure if a fix would involve work on QGIS itself, or gdal, or perhaps both.</div><div><br></div><div>Regards,</div><div>Alister</div></div></div>