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

Daniel Evans daniel.fred.evans at gmail.com
Fri Mar 10 05:52:42 PST 2023


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?
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.

Cheers,
Daniel


More information about the QGIS-User mailing list