Ticket #3635 (closed enhancement: fixed)

Opened 2 years ago

Last modified 2 years ago

getFeatureInfo should return wms_title in GML

Reported by: stetou Owned by: mapserverbugs
Priority: normal Milestone:
Component: WMS Server Version: 5.6
Severity: normal Keywords: getFeatureInfo
Cc: assefa, tomkralidis

Description

The GML response contains the layer name which is often useless for the user. wms_layername can be used in the METADATA but it can not have spaces since it will be an XML tag. Also, wms_layername must end with "_layer" in order to be interpreted by Openlayers read_msGMLOutput format.

I think wms_title value should be returned somehow in the GML. This string is often much more significative to the enduser than the layer name.

GetCapabilities? returns the name and the wms_title. GetFeatureInfo? should return that as well. Steve

Change History

Changed 2 years ago by sdlime

  • owner changed from sdlime to mapserverbugs
  • component changed from MapServer C Library to WFS Server

Changed 2 years ago by sdlime

  • component changed from WFS Server to WMS Server

Changed 2 years ago by dmorissette

  • status changed from new to closed
  • resolution set to wontfix

Unfortunately, there is not really room for this kind of information (metadata really) in a GML response.

In the OGC services model, metadata information such as layer title should be obtained by the client via the GetCapabilities? call, and if a mapping from layer name to title is required then that should be done by the client itself based on the GetCapabilities? data.

Note that this is not a MapServer limitation: it's the way OGC services are designed to work. This is not to say that what you want to achieve (displaying layer title in a query response) is not possible, just that it has to be handled by the client based on GetCapabilities? info, and not by modifying the GetFeatureInfo? response.

Closing as wontfix.

Changed 2 years ago by dmorissette

  • cc assefa, tomkralidis added

Actually, without this being part of the WMS standard for GetFeatureInfo?, could MapServer embed information such as layer title and other metadata info as additional attributes of a FeatureCollection? in a GML response?

Tom, Assefa, do you know enough about GML to answer this question?

Changed 2 years ago by assefa

From what I can see there are name and description elements that are optional within a FeatureCollection? that can be used.

 http://schemas.opengis.net/gml/2.1.2/feature.xsd  http://schemas.opengis.net/gml/3.2.1/feature.xsd

We could possibly used them with I guess something like gml_description on the layer

Changed 2 years ago by tomkralidis

MapServer's WMS GetFeatureInfo response format is not valid GML (documented in #801), so (at this point) we could really return anything we want.

As Assefa says, we could use gml:name or gml:description; GML allows these in their abstract object defs.

I propose to output gml:name like:

<foo_layer>
  <gml:name>$bar</gml:name>
  ...
</foo_layer>

where $bar is LAYER.METADATA.wms_title. If it's set, then we output.

We could also add gml:description (which could map to LAYER.METADATA.wms_abstract, but we shouldn't be overloading GetFeatureInfo too much as this really should be picked up from the Capabilities XML.

Comments?

Changed 2 years ago by tomkralidis

Committed to trunk in r11172. Added only ows:title as gml:name. As stated above, any more metadata should be fetched from GetCapabilities.

Changed 2 years ago by schpidi

  • status changed from closed to reopened
  • resolution wontfix deleted

Changed 2 years ago by schpidi

  • status changed from reopened to closed
  • resolution set to fixed

Changed 2 years ago by schpidi

Was fixed so resolution changed to fixed.

Changed 2 years ago by assefa

msautotest wms_getfeatureinfo130.xml updated r11327

Note: See TracTickets for help on using tickets.