[Qgis-user] Display of non-axis-aligned pixels

Alister Hood alister.hood at gmail.com
Fri Mar 10 23:29:48 PST 2023


>
> Date: Fri, 10 Mar 2023 13:52:42 +0000
> From: Daniel Evans <daniel.fred.evans at gmail.com>
> To: qgis-user at lists.osgeo.org
> Subject: [Qgis-user] Display of non-axis-aligned pixels
> Message-ID:
>         <
> CANnaQaY0-e_Hio8dww88ZO-aHi4gsjSmTeRLbE0dtH_XqPsXeA at mail.gmail.com>
> Content-Type: text/plain; charset="UTF-8"
>
> Hello,
>
> I have some raster data where the pixels are not
> coordinate-system-aligned - i.e. the geotransform has significant
> diagonal components. `gdalinfo` reports:
>
> GeoTransform =
>   444048.6420808117, 6.302162394202463, 6.152691784443768
>   5417729.777950762, 4.143808265940849, -3.26376570161891
>
> When viewing the raster in QGIS, I am surprised to find that it
> displays the pixels as north-aligned. An example is here:
> https://i.imgur.com/i6y1gtM.png
>
> If I make nodata visible, it seems that QGIS is displaying an
> axis-aligned image corresponding to the bounding box of my original
> image (data in white, nodata in black). Screenshot here:
> https://i.imgur.com/ZQJ6Mi5.png
>
> This behaviour surprised me, as QGIS is capable of showing pixels at a
> slant in some circumstances. For example, if I set QGIS to render
> using a different UTM zone, the pixels are slanted - although in this
> case, it's applying a second rotation on top of the north-aligning
> rotation it's already applying: https://i.imgur.com/LoC7jyk.png
>
> 1. Is it possible to have QGIS display a raster without resampling the
> pixels to axis-aligned?
>

I don't believe so.


> 2. Is there a reason for making this the default (or only) behaviour?
> It caused quite some confusion when trying to diagnose a
> geotransform-related issue elsewhere.
>

Several bug reports have been filed about this over the years, (e.g.
https://github.com/qgis/QGIS/issues/23760, 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.
I'm not even sure if a fix would involve work on QGIS itself, or gdal, or
perhaps both.

Regards,
Alister
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/qgis-user/attachments/20230311/9860c7e8/attachment.htm>


More information about the QGIS-User mailing list