Feature request #3768

print composer & wms layers (max size)

Added by Giovanni Manghi about 13 years ago. Updated almost 6 years ago.

Status:Closed
Priority:Normal
Assignee:Jürgen Fischer
Category:Web Services clients/WMS
Pull Request or Patch supplied:No Resolution:fixed
Easy fix?:No Copied to github as #:13827

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 Magnifier - limit and split wms getmap requests to a given tile size. (6.33 KB) Jürgen Fischer, 2011-04-21 12:12 PM

History

#1 Updated by Jürgen Fischer about 13 years ago

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

#2 Updated by Giovanni Manghi almost 13 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.

#3 Updated by Jürgen Fischer almost 13 years ago

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

applied in d508f56a

#4 Updated by Ricardo Silva about 12 years ago

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

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)

#5 Updated by Jürgen Fischer about 12 years 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.

#6 Updated by Giovanni Manghi about 12 years 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.

#7 Updated by Jürgen Fischer almost 6 years ago

  • Category set to Web Services clients/WMS
  • Description updated (diff)

#8 Updated by Tilman Brock-Hesse almost 6 years ago

Jürgen Fischer wrote:

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.

In WMS 1.3.0 Capabilities there are optional global (not layer specific) fields MaxWidth and MaxHeight (its in the top-level <service> tag). I have added FR #19150 to make QGIS set them as defaults for the layer tile size when adding WMS layers.

Also available in: Atom PDF