Bug report #475

square raster's pixels not square on display = rasters of different res are displaced

Added by Redmine Admin almost 18 years ago. Updated over 15 years ago.

Status:Closed
Priority:Low
Assignee:nobody -
Category:Rasters
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

Description

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

Maciek

too_tall.png (15.9 KB) Redmine Admin, 2006-12-21 02:20 PM

too_wide.png (14.4 KB) Redmine Admin, 2006-12-21 02:21 PM

displaced.png (16.5 KB) Redmine Admin, 2006-12-21 02:22 PM

GRASS_mon.png (5.11 KB) Redmine Admin, 2006-12-21 02:22 PM

5res.tif (3.03 KB) Redmine Admin, 2006-12-29 02:30 AM

10res.tif (2.94 KB) Redmine Admin, 2006-12-29 02:31 AM

History

#1 Updated by Tim Sutton almost 18 years ago

Does the problem correct itself after the next pan / zoom?

#2 Updated by Gary Sherman almost 18 years ago

I can't duplicate the problem described in steps 1-4, using either a TIFF or GRASS raster.

GDAL 1.3.2, GRASS 6.2.0

#3 Updated by anonymous - almost 18 years ago

Replying to [comment:1 timlinux]:

Does the problem correct itself after the next pan / zoom?

No.

#4 Updated by anonymous - almost 18 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).

GDAL 1.3.2

Same here.

GRASS 6.2.0

I don't think this matters. The bug is in displaying all rasters.

Maciek

#5 Updated by Gary Sherman almost 18 years ago

I don't need to measure the pixels. I can see that they are still square and I did try it from various locations in the raster.

#6 Updated by Redmine Admin almost 18 years ago

Well then can you display 2 rasters with identical cells allignment, but of different resolution, set the transparency, and reproduce steps 5, 6?

#7 Updated by Gary Sherman almost 18 years ago

Replying to [comment:6 ]:

Well then can you display 2 rasters with identical cells allignment, but of different resolution, set the transparency, and reproduce steps 5, 6?

I don't have any suitable test data....

#8 Updated by Redmine Admin almost 18 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.

Maciek

#9 Updated by Gavin Macaulay - almost 18 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.

#10 Updated by anonymous - almost 18 years ago

Further note: this problem only occurs when the image is panned so that some of the image is off the visible map.

#11 Updated by Gavin Macaulay - almost 18 years ago

  • Status changed from Open to Closed
  • Resolution set to fixed

Fixed in 0.8 branch () and head ().

#12 Updated by Anonymous over 15 years ago

Milestone Version 0.8 deleted

Also available in: Atom PDF