I am testing my WMS service with QGIS and have noticed that even when the layer is configured in "non tile" mode (tile size is not specified) QGIS will generate multiple requests to my WMS service. This will only happen when the map area is large (QGIS running on large resolution monitor).

Is there a way for QGIS to only generate one request WMS service (with image pixel size request equal to exactly currently viewed map size)?

  • 2
    Many WMS services have a maximum image size they will support, so it makes sense to restrict the size of very large image requests. – Ian Turton Apr 26 '19 at 7:13
  • Does the service have <MaxWidth> or <MaxHeight> set? – nmtoken Apr 26 '19 at 9:31
  • @IanTurton my WMS service does not have the values set for <MaxWidth> and <MaxHeight> – cierech Apr 26 '19 at 15:58
  • Not everyone sets that but if you can manage tiles why not play safe – Ian Turton Apr 26 '19 at 16:59
  • 1
    I don't understand the previous comment. Each GetMap is a separate and independent request. Tiled WMS GetMaps are just a bunch of single image requests in a row and any WMS server can handle them. – user30184 Apr 28 '19 at 17:15

As @user30184 suggested increasing the tile size to a large number (larger than the pixel extent of the displayed map in qgis) solves this problem. This is not ideal as I do not know the end user's screen size. I can choose a size that I'm reasonably sure will be bigger than anything a user can throw at the service (like 10000x10000), but at that point this is such a large image to generate, that the experience is too slow.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.