Bug report #8824

Exported image from OpenLayer plugin looks shifted no matter of format but looks right in app

Added by Mikhail Titov over 10 years ago. Updated over 9 years ago.

Status:Closed
Priority:Normal
Assignee:-
Category:Map Composer/Printing
Affected QGIS version:2.0.1 Regression?:No
Operating System:win32 Easy fix?:No
Pull Request or Patch supplied:No Resolution:invalid
Crashes QGIS or corrupts data:No Copied to github as #:17517

Description

I use Bing map as a background. Everything looks right while in application and in Map Composer. However saving it results in a shifted background. The shift extend is QGIS version dependent. See attachments.

This behavior is particular to OpenLayer plug-in as regular GeoTIFF raster exports properly. However everything appears normal when in app. This leads me to believe that composer handles plugin data in a different way.

This is from stable 2.0 and 2.1.0-21 updated as of this day. 2.1.0-23 fails to start as per #8823.

map-inlet-pool-2.1.png - Export result with shifted OpenLayer background (830 KB) Mikhail Titov, 2013-10-11 12:05 PM

map-inlet-pool-2.0.png - Different amount of shifting (738 KB) Mikhail Titov, 2013-10-11 12:05 PM

qgis-composer-window.PNG - Correct view in composer (1010 KB) Mikhail Titov, 2013-10-11 12:05 PM

qgis-app-window.PNG - Correct view in main window (2.03 MB) Mikhail Titov, 2013-10-11 12:05 PM

map-inlet-pool-DEM-bg.png - Regular GeoTIFF raster appears correct (316 KB) Mikhail Titov, 2013-10-11 12:05 PM

saveas.png - Project -> Save as Image (1.46 MB) Mikhail Titov, 2013-10-11 12:22 PM

Print_Composer_screenshot.jpg - screenshot of Pritn composer (358 KB) Micha Silver, 2014-07-28 10:53 PM

Output_map.jpg - Output (save as image) map (792 KB) Micha Silver, 2014-07-28 10:54 PM


Related issues

Duplicated by QGIS Application - Bug report #8825: OpenLayers plugin print bug Closed 2013-10-11

History

#1 Updated by Mikhail Titov over 10 years ago

I don't know if that matters but all polygons use NAD83 UTM 15N (ESPG:26915) and so was the project document. The setting for latter was forced back as OpenLayer plug-in switched it to something else (WGS 84?). Anyway it does appear correct in app itself.

#2 Updated by Mikhail Titov over 10 years ago

Most notably Save As from the main menu of the main window works just fine!

#3 Updated by Mikhail Tchernychev over 10 years ago

Just added the same issue at the same time..
It used to be only possible to use OpenLayers with Pseudo Mercator projection, but
now apparently "project on the fly" option works everywhere in QGIS with OpenLayers but
not in printing.

#4 Updated by Giovanni Manghi over 10 years ago

  • Resolution set to invalid
  • Status changed from Open to Closed

The OpenLayers plugin does not support printing in the map composer. Saving the canvas with "save as image" and adding the result to the composer is the only workaround.

As a 3rd party plugin issues about it need to be filed in its own subproject

https://issues.qgis.org/projects/openlayers

#5 Updated by Mikhail Tchernychev over 10 years ago

I would disagree that this is plugin problem. The issue is wider -
essentially, it states that Map Composer fails to support "on the fly"
projection option, and means that other layers also might be affected.
In other words if I have two files in my project - one geoTIFF in UTM
and another shape file in Lat/Lon WGS84, and not sure they are printed
correctly.

I don't know plugin API well enough, and docs are sketchy to say if plugin
must have separate code to support printing. I would expect this should
be handled by QGIS.

The complete work around is the following:

1. Use QGIS OpenLayers or other tools to capture pierce of satellite imagery
you need for your project.

2. Use QGIS referencer to reference that image. Note that you can use canvas
coordinates for that. You get GeoTiff file in Pseudo Mercator

3. Re-project that Geotiff into projection you use for your project, such as UTM

4. Use in your project. It works fine, I did it few times in the past.

Best Regards,
Mikhail

#6 Updated by Andre Joost almost 10 years ago

Mikhail Tchernychev wrote:

1. Use QGIS OpenLayers or other tools to capture pierce of satellite imagery
you need for your project.

2. Use QGIS referencer to reference that image. Note that you can use canvas
coordinates for that. You get GeoTiff file in Pseudo Mercator

You don't have to georeference output from QGIS "Save as image". It has a world file, and only needs CRS information. EPSG:3857 in this case.

#7 Updated by Micha Silver over 9 years ago

I'm seeing this behavior again now, with QGIS 2.4 and the Openlayers Plugin 1.3.3

I load a vector layer, then any of the Openlayers backgrounds, and set O-t-F. Everythng looks good on the canvas. I can also change projections and everything overlays as expected. I open Print Composer and make a map. Still layers overlay perfectly. I can display either in 3857 or a local projection and it looks fine.

Then I try to print or export to jpeg or pdf, and the background layer gets shifted. It seems that the shift is always to S.E. I tried to load the openlayers first and the vector after - same prob. I also exported the vector layer to CRS 3857, and loaded only that layer with an openlayers background. Still when printing or exporting to jpeg the shift appears.

I tested both on Win 7 64 and on Linux (Mint 17). Still same problem.

Thanks for any suggestions,
Micha

#8 Updated by Giovanni Manghi over 9 years ago

Micha Silver wrote:

I'm seeing this behavior again now, with QGIS 2.4 and the Openlayers Plugin 1.3.3

I load a vector layer, then any of the Openlayers backgrounds, and set O-t-F. Everythng looks good on the canvas. I can also change projections and everything overlays as expected. I open Print Composer and make a map. Still layers overlay perfectly. I can display either in 3857 or a local projection and it looks fine.

Then I try to print or export to jpeg or pdf, and the background layer gets shifted. It seems that the shift is always to S.E. I tried to load the openlayers first and the vector after - same prob. I also exported the vector layer to CRS 3857, and loaded only that layer with an openlayers background. Still when printing or exporting to jpeg the shift appears.

I tested both on Win 7 64 and on Linux (Mint 17). Still same problem.

Thanks for any suggestions,
Micha

you must use one of this scales

20 : 1128.497220
19 : 2256.994440
18 : 4513.988880
17 : 9027.977761
16 : 18055.955520
15 : 36111.911040
14 : 72223.822090
13 : 144447.644200
12 : 288895.288400
11 : 577790.576700
10 : 1155581.153000
9 : 2311162.307000
8 : 4622324.614000
7 : 9244649.227000
6 : 18489298.450000
5 : 36978596.910000
4 : 73957193.820000
3 : 147914387.600000
2 : 295828775.300000
1 : 591657550.500000

#9 Updated by Micha Silver over 9 years ago

Thanks, not working for me :-(

#10 Updated by Micha Silver over 9 years ago

Micha Silver wrote:

Thanks, not working for me :-(

#11 Updated by Micha Silver over 9 years ago

Micha Silver wrote:

Micha Silver wrote:

Thanks, not working for me :-(

Also available in: Atom PDF