Bug report #5827

Printing issue

Added by Vivien Deparday over 2 years ago. Updated about 15 hours ago.

Status:Open Start Date:06/19/2012
Priority:Normal Due date:
Assigned to:Pirmin Kalberer % Done:

0%

Category:-
Target version:-
Patch supplied:No Tag:

Description

I am trying to print a map (as an image) with the map composer. The map is composed of two vector layers (boundaries) displayed over tiles (Google Street or OpenStreetMap). It looks good in the main interface. It looks good in the map composer.
However, when printing the map as an image with the map composer, in the resulting exported image, the vector layers are no longer aligned properly with the tiles. It also looks like the tiles are at the wrong scale.

I have the same issue with Google Street and OpenStreetMap. I have not tested the other layers.

I am using:
OpenLayers Plugin v 0.92
QGIS 1.8.0 (from ubuntu-gis unstable)
Kubuntu 12.04

It sounds similar to this issue: http://hub.qgis.org/issues/4223

printing_issue.zip (519.6 kB) Otto Dassau, 11/06/2012 05:56 am

Screenshot_QGIS_google.jpg (751.5 kB) Christian Seemann, 02/15/2013 08:47 am

Test_google_a4_5000.pdf (213 kB) Christian Seemann, 02/15/2013 08:48 am

GenderMap.png - Result, png, location shifted (1.2 MB) Evelien Christiaanse, 03/20/2014 02:18 am

Screenshot1.png - Screenshot print composer (596.2 kB) Evelien Christiaanse, 03/20/2014 02:18 am

TransKLA.pdf - Result, pdf, scale changed (1 MB) Evelien Christiaanse, 03/20/2014 02:18 am

A1_map_size.PNG (16 kB) damien stephens, 08/14/2014 05:30 pm

bad_mapcomposer.jpeg - Map with bug (631.8 kB) sdf what, 09/03/2014 12:40 pm

good_exportimage.jpeg - Map without bug (dark lines tract boundaries, orange dots three lakes) (233.1 kB) sdf what, 09/03/2014 12:40 pm

History

Updated by MRick - about 2 years ago

I have exactly the same problem with QGIS 1.8.0 under Mac OS X.

This bug is similar to the issue: http://hub.qgis.org/issues/4223 that has been fixed for 1.7.0, but it is coming back again with QGIS 1.8 …

Edit: it will not happen with all the layers : if I use a Google based layer, no problem, with an OSM based layer, the bug happens.

Updated by MRick - about 2 years ago

I made tests back to version 1.7 and everything works perfectly well.
Printing is even smoother with version 1.7 than version 1.8.

Updated by Pirmin Kalberer almost 2 years ago

We can't reproduce these printing problems using QGIS 1.8 and master branch. Could you provide us a minimal dataset?

Updated by Otto Dassau almost 2 years ago

Hi,

I just had the same problem with QGIS 1.8 under opensuse 12.2. I added a zip file. If you open the project "printing_issue.qgs" and the included DIN a3 map composition, all seems fine (see image screenshot.jpg). But when I export as PDF the google and vector layer extent don't fit anymore.

I use the openlayers plugin version 1.0.0

Regards
Otto

Updated by Otto Dassau almost 2 years ago

  • Assigned to set to Pirmin Kalberer

Hi,

problems occur in both plugin versions 0.93 and 1.0.0 when I try to create DIN A3 maps. For DIN A4 it seems to work better.

Regards
Otto

Updated by Christian Seemann over 1 year ago

Hi everyone!

I got exactly the same Problem (see attached file):

QGIS 1.8.0 Lisboa
OpenLayers 1.1.0
Mac OS X 10.6.8 Snow Leopard

and Scale or Paper Size make no difference.
I noticed that it often works better "at the beginning" when I start QGIS but after a few (2 or 3) exports and after panning / working on the map int the main window, it starts "matching" the openlayers (google, osm...) a little slower with the vector layer.
...As if the memory was full! (8GB)
And suddenly the export shows the misalignment.

Anyway, I also would be very happy and grateful for some help!!
Thanks and regards

Chris

Updated by Christian Seemann over 1 year ago

...and this is the PDF result!

P.S. Sorry for posting the 2 Pics in different messages!

Updated by MRick - about 1 year ago

Still not working after all this time and latest update of both OpenLayers and QGis …

Updated by Rowan Murphy 10 months ago

Am having exactly the same issue with:
  • QGIS 2.0.1
  • Open Layers 1.1.1

We do a lot of jobs on QGIS with many different vector/raster layers using Google aerial, Bing aerial underlay (Open Layers). The error is consistent across all projects with QGIS 2.X.X or higher.

On the same PC with the same map files/layers we do not experience this issue with:
  • QGIS 1.8.0
  • Open Layers latests stable release (from:http://openlayers.org/api/OpenLayers.js)

Is there anything that can be helped? Are we making a mistake in settings or do we have to remain with QGIS 1.8.0 until a fix is available?

Updated by Fridolin Haag 10 months ago

Still the same with Open Layers 1.1.2 (and QGIS 2.0.1).
Seems to be the same as: Bug #8824 , which was closed because: "The OpenLayers plugin does not support printing in the map composer."
It was suggested it has to do with the Map Composer failing to support "on the fly" projection, but reprojecting my layers to the basemap projection did not help.

Updated by Evelien Christiaanse 6 months ago

I have had the same issue recently while using 2.2.0. I made a vector layer and had it over an Open Street Maps layer, it looked fine when I made it in the print composer. However, as I exported it (pdf or png) the OSM layer was changed in scale or location.

Updated by A G about 1 month ago

Hi all

Thanks to all those who developed and contributed towards this plugin =].

I believe I'm getting this problem also. I tried to do bit of testing.

QGIS Desktop version 2.0.1-Dufour 64-bit (ubuntu trusty repo) and Openlayers plugin 1.1.4 works for me under either conditions:

  • OTF projection off + vector layer with CRS EPSG 3587
  • OTF projection on + vector layer with CRS not using EPSG 3587 (EPSG:27700 in this case)

However, for me, the following suffer from the "misaligned map composer exports" bug:

  • QGIS Desktop 2.4 64-bit + Openlayers plugin 1.3.3
  • QGIS Desktop 2.5-master 64-bit + Openlayers plugin 1.3.3

Test Details

Computer System
Ubuntu 14.04.1 64-bit

Setup 01
QGIS Desktop: 2.0.1-Dufour 64-bit (from default ubuntu trusty source)
Openlayers Plugin: 1.1.4
Project CRS: EPSG 3587
Project Layers: 1 x shapefile (EPSG 3587), 1 x google satellite basemap
QGIS Desktop Map Scale: 1:5141

QGIS Map Composer Map Scale: 7151
Paper Size: A4
Paper Orientation: Landscape
Export Resolution: 300 DPI

Export Results
PDF: correctly aligned
Image: correctly aligned
PS: correctly aligned

Test 02
change to on the fly projection
PDF: correctly aligned
Image: correctly aligned
PS: correctly aligned

Test 03
change map composer map scale to 6000
PDF: correctly aligned
Image: correctly aligned
PS: correctly aligned

Test 04
reproject vector layer to a different crs and load over basemap
PDF: correctly aligned
Image: correctly aligned
PS: correctly aligned

Setup 02
QGIS Desktop: 2.4 64-bit (from qgis repos)
Openlayers Plugin: 1.3.3
Project CRS: EPSG 3587
Project Layers: 1 x shapefile (EPSG 3587), 1 x google satellite basemap
QGIS Desktop Map Scale: 1:5141

QGIS Map Composer Map Scale: 7151
Paper Size: A4
Paper Orientation: Landscape
Export Resolution: 300 DPI

PDF: incorrectly aligned
Image: incorrectly aligned
PS: incorrectly aligned

Test 01
reproject vector layer to a different crs and load over basemap
PDF: incorrectly aligned
Image: incorrectly aligned
PS: incorrectly aligned

Setup 03
QGIS Desktop: 2.5-master 64-bit (from qgis repos)
Openlayers Plugin: 1.3.3
Project CRS: EPSG 3587
Project Layers: 1 x shapefile (EPSG 3587), 1 x google satellite basemap
QGIS Desktop Map Scale: 1:5141

QGIS Map Composer Map Scale: 7151
Paper Size: A4
Paper Orientation: Landscape
Export Resolution: 300 DPI

PDF: incorrectly aligned
Image: incorrectly aligned
PS: incorrectly aligned

Test 01
reproject vector layer to a different crs and load over basemap
PDF: incorrectly aligned
Image: incorrectly aligned
PS: incorrectly aligned

Test 02
try out bing and osm basemaps
PDF: incorrectly aligned
Image: incorrectly aligned
PS: incorrectly aligned

Updated by damien stephens about 1 month ago

I think I have identified the problem. when printing in windows if you set the position and size of the map layer in the composer exactly equal to the page size, the open layers match the vector layers, otherwise the openlayers get their extents from the page size and then fit the layer to the smaller map size, causing misalignment.

basically the open layers plugin is using the page size instead of the map size when choosing the are of the open layer to display when printing. should be a simple fix for someone with coding skills? unlike myself.

As a work around just set the map size to exactly the page size in the composer. attached image shows the setting for A1.

Updated by Simon Bowyer about 1 month ago

Damien - good work, I was having terrible problems with this. Just tested your method on Win 7 using QGIS 2.4 and it fixes it. Thanks!

Updated by sdf what 27 days ago

I am having the same problems with misalignment when creating an image or pdf from composer.

QGIS version 2.4.0, Openlayers 1.3.3, Windows 7. I have set everything to SRS 3857, both OTF and not.

I will try tonight with my freebsd machine at home, and I will also install the dev QGIS on the windows machine and try again.

The workaround in 5827#note-14 doesn't work for me, and it smooshes the map against the upper left corner of the paper anyway.

The export-as-image function works fine, though (see good image attached).

Based on the diversity of situations in the bug report, I wonder if it isn't something not exactly Open Layers??

I am hoping to teach a class using QGIS this October, and having this feature ironed out would help silence the ESRI cool-aid drinkers....

Updated by Rodrigo Principe about 15 hours ago

I have the same problem... QGIS 2.4, Openlayer 1.3.3, windows 7 (if it is relevant). The workaround #5827 (note 14) didn't work for me. I think this is a major issue to solve (come on developers!).. QGIS can be so powerful, but if I can't print it out, I will be forced to change software (I don´t want to). Thank you!

Also available in: Atom PDF