[Qgis-developer] mismatch between mapCanvas size vs. mapRenderer size

Martin Dobias wonder.sk at gmail.com
Thu Jan 19 05:52:05 EST 2012


On Thu, Jan 19, 2012 at 11:33 AM, SBL <Stefan.Blumentrath at nina.no> wrote:
> Hi When exporting a map from canvas (through the composer) to a tif with a
> world file I recognised a mismatch between mapCanvas size vs. mapRenderer
> size (canvas is 2 to 4 pixels larger). But they have an indentical
> geographical extent. The effect is, that with the tfw file (which I am
> writing out as described here:
> http://www.stumbleupon.com/su/7fqJyR/mikeongis.wordpress.com/2011/08/25/map-design-with-qgis),
> the tif is a little bit displaced with regards to the original map. (By the
> way: the same happens in ArcGIS...) Any ideas/suggestions how to export a
> tif and a precise tfw (or a geotif)? Cheers Stefan

Hi Stefan

the difference is that mapCanvas size counts also pixels used for
outer frames. mapRenderer size is the true map size (and it is the
same as mapCanvas.viewport() size).

Martin


More information about the Qgis-developer mailing list