MapServer / MapServer-import

3 stars 2 forks source link

[WMS] GetFeatureInfo format #1169

Open tbonfort opened 12 years ago

tbonfort commented 12 years ago

Reporter: jmckenna@dmsolutions.ca Date: 2005/01/18 - 01:39

For the DEMIS WMS server, mapserver incorrectly interprets the GetFeatureInfo
format as "application/vnd.ogc.gml" and apparently this is not so on the DEMIS
server (their server admin has complained about exceptions that this is
creating).  here is the getcapabilities request:

http://www2.demis.nl/wms/wms.asp?wms=WorldMap&SERVICE=wms&VERSION=1.1.1&REQUEST=getcapabilities

Does MapServer always request GetFeatureInfo in "application/vnd.ogc.gml" format
even if that's not what the server supports?
tbonfort commented 12 years ago

Author: jmckenna@dmsolutions.ca Date: 2005/01/18 - 15:52

sorry this might be a client issue (Chameleon)..I will mark this as invalid if
that is the case.
tbonfort commented 12 years ago

Author: dmorissette Date: 2005/01/18 - 16:42

Here are the supported formats listed in this server's capabilities:

   <GetFeatureInfo>
     <Format>text/html</Format>
     <Format>text/swf</Format>
     ...
   </GetFeatureInfo>
tbonfort commented 12 years ago

Author: assefa Date: 2005/01/18 - 16:53


I think mapserver only provides utility functions to generate the URL that
should be used for doing a Getfeatureinfo. There is a php wrapper function on
top of this function which is  :
  string getWMSFeatureInfoURL(int clickX, int clickY, int featureCount, 
                               string infoFormat)

So the client is the one setting the infoFormat when building the Getfeatureinfo
url. 

I have checked chamelon and found a couple of calls using the function and the
info_format is set to MIME. This info_format works for a WMS server using
Mapserver but may not work for others.

Couple of notes on this :

  - the function in Mapserver (and php/mapscript) should make the infoFormat
argument optional. Note that in wms 1.1.1  the info_format for a GetFeatureInfo
request is optional.  I have added a bug on this (Bug 1171). 

  - the 2nd point is that chameleon (or other clients using this function)
should either not set the infoformat or set it after making sure that it is
supported by the server.

 After all this I am not sure where the application/vnd.ogc.gml comes from !!! :) 
tbonfort commented 12 years ago

Author: barta@demis.nl Date: 2005/02/26 - 01:07

A comment from Demis:

we have updated the supported formats (1.1.0 and above) to add plain text and 
xml:

<Format>text/xml</Format>
<Format>text/plain</Format>
<Format>text/html</Format>
<Format>text/swf</Format>

GML will be added in a week or so, i suppose this would have been more 
straightforward if OGC had provided a few templates for featureinfo 
requests ...
tbonfort commented 12 years ago

Author: dmorissette Date: 2009/02/23 - 23:31 Closing as INVALID since this sounds very much like a client (i.e. Chameleon) problem and not a MapServer problem, and a test a few minutes ago has shown that the Demis server at the URL above now supports application/vnd.ogc.gml for GetFeatureInfo, making this a non-issue anyway:

            <GetFeatureInfo>

                <Format>text/xml</Format>

                <Format>text/plain</Format>

                <Format>text/html</Format>

                <Format>text/swf</Format>

                <Format>application/vnd.ogc.gml</Format>
xiaoshiliu commented 6 years ago

Hi,although the issue has been long, I also want to ask you some question about WMS server. I want to use the method of getFeatureInfo to achieve Click-Query. I can got the point of longitude and latitude,but how I get the request parameters, Width,Height,BBox,X andY.My projetion is WGS 84, EPSG is 4326. Please help me with this as soon as possible. Thank you so much.