[Qgis-developer] Unit tests failing - a heartfelt plea

Radim Blazek radim.blazek at gmail.com
Sat Jun 16 03:53:49 PDT 2012


> Here it is http://dash.orfeo-toolbox.org/viewTest.php?buildid=87438
> it looks interesting. In the first raster test called 'raster', some
> columns are wider, some others are narrower. In following raster
> tests, the problem may be the same (columns and rows somehow shifted).

More observations:
* test raster tenbytenraster.asc size is 10x10
* output device is set to expected_raster.png size 100 x 100
* QgsMapRenderer::render is using
     rasterScaleFactor = ( thePaintDevice->logicalDpiX() +
thePaintDevice->logicalDpiY() ) / 2.0 / sceneDpi;
   in this case:
     thePaintDevice->logicalDpiX() = 85 thePaintDevice->logicalDpiY() = 86
     sceneDpi = 96 rasterScaleFactor = 0.890625
* because of rasterScaleFactor, the raster is rendered as 90x90
instead of 100x100, doing such resampling, it may probably happen that
certain output column falls to a different data source column
depending on architecture - it is not clear to me however, how it
would be possible, it should be all IEEE 754, there is also IEEE
754-2008, but I have no idea if it can make difference or if it is
even implemented in new CPUs. Anyway, we should not usually reach such
problems.

Anybody has idea why rasterScaleFactor is used and how it should work?

Radim


More information about the Qgis-developer mailing list