Bug report #475
square raster's pixels not square on display = rasters of different res are displaced
|Affected QGIS version:||Regression?:||No|
|Operating System:||Debian||Easy fix?:||No|
|Pull Request or Patch supplied:||Resolution:||fixed|
|Crashes QGIS or corrupts data:||Copied to github as #:||10534|
1. add a a raster with square pixels
2. change QGIS window's proportion to be taller-than-wide, or vice versa
3. zoom in
4. see how the pixels are not displayed square (too_wide.png, too_narrow.png)
5. now display one raster of 5m and one of 10m resolution
6. see how they are misplaced against each other; set some transparance to see this clearly (misplaced.png)
BTW, these are GRASS rasters I used for examples here, created with r.mapcalc. In QGIS the r.mapcalc output is displayed B&W, while in GRASS (see GRASS_mon.png) it is color with "rainbow" pallete. Note that after I run 'r.colors rules=rainbow' for the raster displayed B&W in QGIS and color in GRASS, it is displayed color in both from then on... weird. Ideas where is the bug (GRASS, GDAL, QGIS, gdal-grass)?
#4 Updated by anonymous - almost 14 years ago
Replying to [comment:2 gsherman]:
I can't duplicate the problem described in steps 1-4, using either a TIFF or GRASS raster.
And I can reproduce it with any raster. Why you can't I don't know.
Pan to the edge of your raster, maybe then you'll see it better. If you still can't see it, measure the pixel dimensions; one axis will be longer (while both should be equal).
I don't think this matters. The bug is in displaying all rasters.
#8 Updated by Redmine Admin almost 14 years ago
Replying to [comment:7 gsherman]:
I don't have any suitable test data....
Attached are 2 such rasters. One is 5m, the other is 10m. Both have exactly the same extent. Open them in QGIS and set transparency for both. Zoom and pan around a bit. Let me know if you can see how missalligned they are against each other. I can. The missalignment is different depending on zoom level and view center point location. It dissapears after zooming to either rasters full extent.
#9 Updated by Gavin Macaulay - almost 14 years ago
This problem can be seen in another way that doesn't require two images.
- load the 5res.tif image
- click on the zoom in tool to get a cross-hair cursor
- place the cursor over the bottom right corner of the image and note down the x/y coordinates (should be 481510, 4180530)
- pan the image so that the bottom right corner of the image is in the middle of the map
- click on the zoom in tool to get a cross-hair cursor again
- place the cursor over the same corner and note the x/y coords. They are different. This is the underlying cause of the mis-matched images.
The x/y coordinate of that corner varies with panning and zooming of the image.