[Qgis-developer] Adding The Selection of Image Type To WMS Setup?
Bruce, Bob (CON)
Bob.Bruce at gov.mb.ca
Sun Apr 14 05:36:42 PDT 2013
Jürgen,
Thanks for getting back to me on this. I cannot seem to find where I can select the image type when I connect to my WMS server. Could you please help me to locate this feature?
My WMS server is:
http://nis.cubewerx.com/cubewerx/cubeserv.cgi?CONFIG=OIM_MB_-_Orthophoto
My GetCapabilities request returns image formats of:
<Format>image/png</Format>
<Format>image/png; PhotometricInterpretation="PaletteColor"</Format>
<Format>image/png; PhotometricInterpretation="RGB"</Format>
<Format>image/png; PhotometricInterpretation="BlackIsZero"</Format>
<Format>image/tiff</Format><Format>image/tiff; PhotometricInterpretation="PaletteColor"</Format>
<Format>image/tiff; PhotometricInterpretation="RGB"</Format>
<Format>image/tiff; PhotometricInterpretation="BlackIsZero"</Format>
<Format>image/gif</Format>
<Format>image/jpeg</Format>
<Format>image/x-jpegorpng</Format>
<Format>image/x-portable-anymap</Format>
<Format>image/x-portable-pixmap</Format>
<Format>image/x-portable-graymap</Format>
<Format>application/x-cubewerx-wkb; version="3"</Format>
<Format>application/x-cubewerx-wkb; version="3"; PhotometricInterpretation="PaletteColor"</Format>
<Format>application/x-cubewerx-wkb; version="3"; PhotometricInterpretation="RGB"</Format>
<Format>application/x-cubewerx-wkb; version="3"; PhotometricInterpretation="BlackIsZero"</Format>
<Format>application/vnd.google-earth.kml+xml</Format>
<Format>application/vnd.google-earth.kml+bxml; bxmlVersion="0.0.8"</Format>
but I don't see how to select these.
As for the user-agent string, we are not seeing anything on the server in the HTTP header to let us know that it is coming from QGIS, however that would not be important to us to know if we could select the image type when we add the WMS layer.
thanks,
Bob Bruce
----- Original Message -----
From: "Jürgen E. Fischer" <jef at norbit.de>
To: qgis-developer at lists.osgeo.org
Sent: Saturday, April 13, 2013 2:36:21 AM
Subject: Re: [Qgis-developer] Adding The Selection of Image Type To WMS Setup?
Hi Bob,
On Fri, 12. Apr 2013 at 18:25:32 -0500, Bruce, Bob (CON) wrote:
> 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?
No, because it's already there. If a WMS server offers multiple formats you
can select the one you want in the wms selection dialog.
> 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.
Supporting that image type shouldn't be a problem. Everything the server
supplies is passed to QImage and that transparently figures out what format it
is - the format selection is only used to form the request.
> 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.
Hm, sounds like two new features. Can you rephrase it as a bug? ;)
We could have QgsNetworkManager set a different or a configurable User-Agent
string. That way almost all requests should have it - should be easy, but I'm
not sure if that's a good thing for everything - as we also use that in the
form widget and there at least a different user agent string might hurt.
The question is how many different agents, we need - per provider? per server?
combinations?...
JÃrgen
--
Jürgen E. Fischer norBIT GmbH Tel. +49-4931-918175-31
Dipl.-Inf. (FH) Rheinstraße 13 Fax. +49-4931-918175-50
Software Engineer D-26506 Norden http://www.norbit.de
committ(ed|ing) to Quantum GIS IRC: jef on FreeNode
--
norBIT Gesellschaft fuer Unternehmensberatung und Informationssysteme mbH
Rheinstrasse 13, 26506 Norden
GF: Jelto Buurman, HR: Amtsgericht Emden, HRB 5502
_______________________________________________
Qgis-developer mailing list
Qgis-developer at lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/qgis-developer
More information about the Qgis-developer
mailing list