Feature #3768

print composer & wms layers (max size)

Added by Giovanni Manghi about 2 years ago. Updated about 1 year ago.

Status:Closed Start Date:
Priority:Normal Due date:
Assigned to:Jürgen Fischer % Done:

0%

Category:Printing
Target version:Version 2.0.0
Platform:All Resolution:fixed
Platform version: Patch supplied:No
Status info:0

Description

When printing a layout that contains a WMS layer QGIS warns the user that some servers (such UMN Mapserver) only serve images of a certain size, so if the map size in the layout is bigger than the size allowed the resulting pdf/print will show a white rectangle.

The workarounds are two:

*) lower the number of DPIs, but this will produce obviously prints with a lower quality

*) (if you have control over the server configuration) allow the server to serve bigger images: this is not really a optimal solution because usually people does not own the wms server they need to use and also because allowing the server to serve bigger image can be a problem in public wms services.

Other GIS (both proprietary and OS) packages seems to not suffer of this limitation as one can print large formats with WMS layers in it, even if the server is configured to serve small images.

Looking into the PDFs produced by this packages it results that the printed map from the WMS server is tiled, making clear what kind of workaround is used.

It will be nice in the future to have this feature in QGIS.

tile-wms.diff - limit and split wms getmap requests to a given tile size. (6.3 kB) Jürgen Fischer, 04/21/2011 12:12 pm

History

Updated by Jürgen Fischer about 2 years ago

the attached patch adds the opportunity to set tile sizes (eg. 256x256) and then splits up the WMS request into multiple requests.

Updated by Giovanni Manghi about 2 years ago

Hi Jurgen, many, many thanks for looking into this and for the patch. I'm still testing it and I'll give feedback asap.

Meanwhile it seems to me that this patch fixes the problem described here #1576.

Updated by Jürgen Fischer about 2 years ago

  • Status changed from New to Closed
  • Resolution set to fixed

applied in d508f56a

Updated by Ricardo Silva about 1 year ago

  • Priority changed from Low to Normal
  • Target version changed from Version 1.7.0 to Version 2.0.0
  • Patch supplied set to No

Hi, this issue seems to still be unresolved

I'm still getting the warning message from QGIS, and then the error message from Mapserver when trying to print a map with a WMS layer. The resulting image also comes without this layer. Tested with master built from revision e54e87f.

(I'm not really sure if I should be editing this issue's details, so please forgive me if I'm out of line)

Updated by Jürgen Fischer about 1 year ago

Ricardo Silva wrote:

I'm still getting the warning message from QGIS, and then the error message from Mapserver when trying to print a map with a WMS layer. The resulting image also comes without this layer. Tested with master built from revision e54e87f.

You need to limit the maximum map request size when adding the WMS layer to the project.

AFAIK there's no standard way for a WMS to supply the information about the limit - some might raise an exception, some might just respond with an empty image if it's exceeded.

Updated by Giovanni Manghi about 1 year ago

Ricardo Silva wrote:

Hi, this issue seems to still be unresolved

I'm still getting the warning message from QGIS, and then the error message from Mapserver when trying to print a map with a WMS layer. The resulting image also comes without this layer. Tested with master built from revision e54e87f.

(I'm not really sure if I should be editing this issue's details, so please forgive me if I'm out of line)

works fine here. The tile size must be defined before adding the wms layer, after connecting to the server. The warning message always pops-up.

Also available in: Atom PDF