Bug report #8272
Bad size request with a georeferenced raster
Status: | Rejected | ||
---|---|---|---|
Priority: | Normal | ||
Assignee: | - | ||
Category: | Rasters | ||
Affected QGIS version: | master | Regression?: | No |
Operating System: | Easy fix?: | No | |
Pull Request or Patch supplied: | No | Resolution: | |
Crashes QGIS or corrupts data: | No | Copied to github as #: | 17075 |
Description
With some georeferenced rasters (for instance a jpeg file with a .jgw world file), visual artifacts may appear on some zoom levels.
Steps to reproduce :- load the raster found in attachment (do not forget to copy the .jgw file in the same directory)
- move it to the top left corner of the canvas, with some space not visible
- extent the canvas window until you see glitches. You can find examples in attachment also.
When these visual artifacts occur, a GDAL error is displayed on the console :
Warning: RasterIO error1: /home/hme/Bureau/atlas/test.jpeg, band 2: Access window out of range in RasterIO(). Requested
(77,626) of size 3431x1854 on raster of 3507x2480.
Indeed there is an off-by-one size calculation somewhere in qgsgdalprovider.cpp
The problem is apparently due to a not very well-formatted world file : some of its constants do not exhibit enough decimals (first and fourth line for instance).
I suspect some strange rounding errors for now ...
History
#1 Updated by Giovanni Manghi over 7 years ago
- Easy fix? set to No
- Regression? set to No
#2 Updated by Hugo Mercier almost 6 years ago
- Status changed from Open to Rejected
- Description updated (diff)
Can't reproduce on 3.5. closing