Feature request #13676

Qgis server GML output customization

Added by Nicolas Liaudat about 9 years ago. Updated over 7 years ago.

Status:Open
Priority:Normal
Assignee:-
Category:QGIS Server
Pull Request or Patch supplied:No Resolution:
Easy fix?:No Copied to github as #:21709

Description

Hi,

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 :

@

<msGMLOutput
xmlns:gml="http://www.opengis.net/gml"
xmlns:xlink="http://www.w3.org/1999/xlink"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
<XXX_layer>
<gml:name>The name</gml:name>
<XXX_feature>
<gml:boundedBy>
<gml:Box srsName="EPSG:21781">
<gml:coordinates>559030.000000,152375.000000 559030.000000,152375.000000</gml:coordinates>
</gml:Box>
</gml:boundedBy>
<Sendeleistung_ERP>P1</Sendeleistung_ERP>
</XXX_feature>
</XXX_layer>
</msGMLOutput>
@

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">
<gml:featureMember>
<qgs:collecteurs fid="2823">
<gml:boundedBy>
<gml:Box srsName="EPSG:21781">
<gml:coordinates cs="," ts=" ">558546.34511081,152513.01841696 558557.06197939,152517.59698501</gml:coordinates>
</gml:Box>
</gml:boundedBy>
<qgs:geometry>
<gml:MultiLineString srsName="EPSG:21781">
<gml:lineStringMember>
<gml:LineString>
<gml:coordinates cs="," ts=" ">558557.06197939,152517.59698501 558546.34511081,152513.01841696</gml:coordinates>
</gml:LineString>
</gml:lineStringMember>
</gml:MultiLineString>
</qgs:geometry>
<qgs:SomeAttr>XXX</qgs:SomeAttr>
</gml:featureMember>
</wfs:FeatureCollection>

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

History

#1 Updated by Nicolas Liaudat about 9 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.

Regards

#2 Updated by Giovanni Manghi over 7 years ago

  • Easy fix? set to No

Also available in: Atom PDF