[Qgis-developer] Adding The Selection of Image Type To WMS Setup?

Bruce, Bob (CON) Bob.Bruce at gov.mb.ca
Fri Apr 12 16:25:32 PDT 2013

Would it be possible to get QGIS modified to allow the selection of the image format type (i.e. PNG, JPEG, or others) in the setup of a WMS connection? The WMS provider specifies the image types that are available using a response to a GetCapabilites request but I don't see anywhere in QGIS where we can select the type of images that we want to get. And it looks like QGIS defaults to the PNG format for requests and I find that PNG files are roughly eight times the size of JPEG images. So defaulting to JPEG images cuts down on network traffic a lot and allows for greater throughput of requests.

Cubewerx provides an image type of "image/x-jpegorpng" where it decides if it needs to send PNG images if we are doing a draw that includes some transparent areas, otherwise it sends JPEG images. This image type is stated in the GetCapabilities response along with the other image types that are supported and if we had the opportunity to select this image type in QGIS then we could get much smaller images most of the time.

We have also discovered that ArcGIS identifies itself through a user-agent string in the header of the request (HTTP method), it sends the following user-agent string: "ArcGIS Client Using WinInet" and Cubewerx has adapted their server to automatically handle the image types that are provided to ArcGIS. Unfortunately we see no such user-agent string provided by QGIS so we are not able to have the server adapted to QGIS image requests. Other clients may need PNG files so we can't have the server force the adaptation of images for every client so it would be helpful to have QGIS provide a user-agent string if we couldn't get the selection of image type for WMS requests.

	Bob Bruce

**    Bob Bruce, FEC, P.Eng.        Geomatics Support Engineer
**    Bob.Bruce at gov.mb.ca           Geospatial Technology Services Management
**    work # (204) 945-6636         GeoManitoba, Manitoba Conservation and Water Stewardship
**    FAX  # (204) 945-1365         1007 Century Street,
**                                  Winnipeg, Manitoba, Canada, R3H 0W4
**                                  49-54-31.85N,97-12-16.08W
**             Check out our digital maps at: http://mli2.gov.mb.ca/
**                 and WMS: http://mlidata.gov.mb.ca/wms/request.aspx

More information about the Qgis-developer mailing list