[Geomoose-users] WMS and Identify

Jim Klassen klassen.js at gmail.com
Wed Jan 23 12:58:44 PST 2013


Seems like a legit problem to me.  The WMS server publishes which requests and formats are supported in its GetCapabilities document.  If GML is not a supported option, the PHP should not be asking for it.  Now should the PHP request the GetCapabilites and parse this every time (slow but reliable) or should this be configured somewhere (error prone?).

Another point is that in many cases, if we use the text/html output, we could probably skip the PHP script entirely for WMS layers and make the request straight from GeoMoose or OpenLayers.  My guess is the PHP script is going for the GML format so it is more on par with what is available from the non-WMS services.

On Jan 23, 2013, at 2:08 PM, Anderson, Dean wrote:

> I have been trying to make the identify service work with a WMS over the last few days.  
> 
> This is what I have found and I would like to verify that what I found is correct.
> 
> You CAN identify a WMS feature using basic calls in mapbook.xml.    However, it appears from review of the identify.php (always a shot in the dark for me) that the identify service is hardwired to only display attributes if your WMS includes 'gml_include_items' metadata reference  (this is what you need in the mapserver mapfile for identify to display attributes in GeoMoose).  Mapserver displays other info_formats such as text/html  just fine that can be consumed by other products like ArcMap. 
> 
The QGIS Identify tool on WMS works similarly (text/html).

The MapServer 'gml_include_items' metadata tells MapServer that it can export those columns in GML (in WFS or when a WMS GetFeatureInfo call requests GML).  This will be different for other WMS servers.

> Other info_formats such as "text/html" do not work and will not reference the TEMPLATE file that can be used with MapServer.

I presume by "does not work" you mean makes no attempt to work.
 
> 
> Please refer to line 179 of the identify.php file and you will see that the services is called with an "&INFO_FORMAT=application/vnd.ogc.gml".
> 
> This may explain why Identify does not work with many WMS's. 
> 
> Given my lack of understanding of GML, PHP, and MapServer I wanted to verify if this is really how the identify service works. If this is so, I will submit a ticket to enhance identify so that the services will recognize other info_formats and allow us to take advantage of the template file. 
> 
> In addition, I found a small bug on line 208 where $splitPos-1 should only be $splitPos (it was not including the last character of my feature title string). 
> 
> Thanks - if I have this messed up please let me know. 
> 
> -- 
> Dean R Anderson
> IT Director
> Polk County
> _______________________________________________
> Geomoose-users mailing list
> Geomoose-users at lists.osgeo.org
> http://lists.osgeo.org/mailman/listinfo/geomoose-users



More information about the Geomoose-users mailing list