Feature request #13676

Qgis server GML output customization

Added by Nicolas Liaudat about 8 years ago. Updated over 6 years ago.

Category:QGIS Server
Pull Request or Patch supplied:No Resolution:
Easy fix?:No Copied to github as #:21709



Actually, we can customize WMS GetFeatureInfo xml output with some parameters in *.qgs projects

  • WMSFeatureInfoDocumentElement: give different feature info root element name (default: GetFeatureInfoResponse)
  • WMSFeatureInfoDocumentElementNS: set namespace for feature info root element (default: none)
  • WMSFeatureInfoSchema: add link to schema to root element
  • WMSFeatureInfoAliasLayers / WMSFeatureInfoLayerAliases: possibility to define aliases for layernames in GetFeatureInfo output
  • WMSInfoFormatSIA2045: Feature output format in SIA2045 schema (default: disabled)

It could be great to add some new to change GML output (WMS GetFeatureInfo INFO_FORMAT=application/vnd.ogc.gml )
or simply set a mapserver gml output mode (perhaps : WMSInfoFormatmsGMLOutput).

The reason is that a lot of WMS clients only implement mapserver's gml output, which looks like this :


<gml:name>The name</gml:name>
<gml:Box srsName="EPSG:21781">
<gml:coordinates>559030.000000,152375.000000 559030.000000,152375.000000</gml:coordinates>

Qgis output looks like that :

<wfs:FeatureCollection xmlns:ogc="http://www.opengis.net/ogc" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xlink="http://www.w3.org/1999/xlink" xmlns:wfs="http://www.opengis.net/wfs" xsi:schemaLocation="http://www.opengis.net/wfs http://schemas.opengis.net/wfs/1.0.0/wfs.xsd http://qgis.org/gml" xmlns:gml="http://www.opengis.net/gml" xmlns:ows="http://www.opengis.net/ows" xmlns:qgs="http://qgis.org/gml">
<qgs:collecteurs fid="2823">
<gml:Box srsName="EPSG:21781">
<gml:coordinates cs="," ts=" ">558546.34511081,152513.01841696 558557.06197939,152517.59698501</gml:coordinates>
<gml:MultiLineString srsName="EPSG:21781">
<gml:coordinates cs="," ts=" ">558557.06197939,152517.59698501 558546.34511081,152513.01841696</gml:coordinates>

msgmloutput.xsl (2.17 KB) Nicolas Liaudat, 2015-10-27 07:32 AM


#1 Updated by Nicolas Liaudat about 8 years ago

Here you'll find a simple XSL to convert qgis WMS GetFeatureInfo INFO_FORMAT=text/xml to mapserver msGMLOutput.

I expect it could help.


#2 Updated by Giovanni Manghi over 6 years ago

  • Easy fix? set to No

Also available in: Atom PDF