Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

print composer & wms layers (max size) #13827

Closed
qgib opened this issue Apr 21, 2011 · 8 comments
Closed

print composer & wms layers (max size) #13827

qgib opened this issue Apr 21, 2011 · 8 comments
Labels
Data Provider Related to specific vector, raster or mesh data providers Feature Request
Milestone

Comments

@qgib
Copy link
Contributor

qgib commented Apr 21, 2011

Author Name: Giovanni Manghi (@gioman)
Original Redmine Issue: 3768

Redmine category:web_services_clients/wms
Assignee: Jürgen Fischer


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.


@qgib
Copy link
Contributor Author

qgib commented Apr 21, 2011

Author Name: Jürgen Fischer (@jef-n)


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

@qgib
Copy link
Contributor Author

qgib commented Apr 25, 2011

Author Name: Giovanni Manghi (@gioman)


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 #11636.

@qgib
Copy link
Contributor Author

qgib commented May 4, 2011

Author Name: Jürgen Fischer (@jef-n)


applied in d508f56


  • resolution was configured as fixed
  • status_id was changed from Open to Closed

@qgib
Copy link
Contributor Author

qgib commented Apr 20, 2012

Author Name: Ricardo Silva (Ricardo Silva)


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)


  • fixed_version_id was changed from Version 1.7.0 to Version 2.0.0
  • pull_request_patch_supplied was configured as 0
  • priority_id was changed from Low to Normal

@qgib
Copy link
Contributor Author

qgib commented Apr 20, 2012

Author Name: Jürgen Fischer (@jef-n)


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.

@qgib
Copy link
Contributor Author

qgib commented Apr 20, 2012

Author Name: Giovanni Manghi (@gioman)


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.

@qgib
Copy link
Contributor Author

qgib commented Jun 21, 2018

Author Name: Jürgen Fischer (@jef-n)


  • category_id was configured as Web Services clients/WMS
  • description was changed from 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. to 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.

@qgib
Copy link
Contributor Author

qgib commented Jun 21, 2018

Author Name: Tilman Brock-Hesse (Tilman Brock-Hesse)


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 tag). I have added FR #26980 to make QGIS set them as defaults for the layer tile size when adding WMS layers.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Data Provider Related to specific vector, raster or mesh data providers Feature Request
Projects
None yet
Development

No branches or pull requests

1 participant