[Qgis-developer] extremely slow rendering rasters

gavin macaulay g.macaulay at niwa.co.nz
Mon Jan 1 17:37:08 EST 2007


This is due to a deficiency in GDAL.

Qgis uses the RasterIO function in GDAL to take the data in a raster 
file and scale it to display on the map canvas. However RasterIO only 
accepts integer indices into the raster file data. This means that when 
one zooms in enough that qgis is just displaying a very small part of a 
single cell, it has to ask RasterIO to expand up the entire cell (i.e., 
it is not possible to ask for a part of a cell).

This can result in very large images (I easily got images of 10,000 by 
10,000 pixels), even though qgis is only displaying a small part of 
that. If you zoom in enough you'll eventually run out of memory and qgis 
will crash.

Somewhat ironically, but in line with the above explanation, if you use 
a raster file with a higher resolution, this problem will reduce. 
Similarly, if you zoom in on a single cell rather than where four cells 
meet, the problem will take more time to appear.

I can think of some enhancements to qgis that would improve the 
situation, and will have a go at them in the next week or two.


Maciej Sieczka wrote:
> Hi,
> QGIS (0.8 SVN 2007.01.01) renders rasters extremely slow at high zoom
> levels.
> Take for example this raster
> https://svn.qgis.org/trac/attachment/ticket/475/10res.tif
> It is only 64 cells, but at a zoom level circa 1:60 panning get's
> painfully slow. At 1:10 it gets impossible. On a 1,86 MHz ATI X700 laptop.
> Can anybody reproduce it? Maybe it is just my setup... If it is not
> only me, is the defect in QT or QGIS, and could it be fixed if the latter?
> Cheers,
> Maciek
> _______________________________________________
> Qgis-developer mailing list
> Qgis-developer at lists.qgis.org
> http://lists.qgis.org/cgi-bin/mailman/listinfo/qgis-developer

More information about the Qgis-developer mailing list