Bug report #9584

WMS GetFeatureInfo response in GML format is not correct

Added by Marcel Dancak over 10 years ago. Updated over 10 years ago.

Status:Closed
Priority:High
Assignee:Marco Hugentobler
Category:QGIS Server
Affected QGIS version:master Regression?:No
Operating System: Easy fix?:No
Pull Request or Patch supplied:No Resolution:fixed/implemented
Crashes QGIS or corrupts data:No Copied to github as #:18167

Description

XML elements of every particular feature (feature ID, geometry, bounding box and attributes) in GetFeatureInfo GML response should be nested in it's own gml:featureMember element:

...
<gml:featureMember>
  <qgs:layer fid="layer.1">
  <qgs:geometry> ... </qgs:geometry>
  ...
</gml:featureMember>
<gml:featureMember>
  <qgs:layer fid="layer.2">
  <qgs:geometry> ... </qgs:geometry>
  ...
</gml:featureMember>
<gml:featureMember>
  <qgs:layer2 fid="layer2.7">
  <qgs:geometry> ... </qgs:geometry>
  ...
</gml:featureMember>
...

Current implementation generates only one gml:featureMember element for all features belonging to the same layer:

...
<gml:featureMember>
  <qgs:layer fid="layer.1">
  <qgs:geometry> ... </qgs:geometry>
  ...

  <qgs:layer fid="layer.2">
  <qgs:geometry> ... </qgs:geometry>
  ...
</gml:featureMember>
<gml:featureMember>
  <qgs:layer2 fid="layer2.7">
  <qgs:geometry> ... </qgs:geometry>
</gml:featureMember>
...

History

#1 Updated by Jürgen Fischer over 10 years ago

  • Assignee deleted (Jürgen Fischer)
  • Subject changed from WMS GetFeatureInfo response in GML fromat is not correct to WMS GetFeatureInfo response in GML format is not correct

#2 Updated by Ivan Mincik over 10 years ago

  • Target version set to Version 2.2
  • Affected QGIS version changed from 2.0.1 to master
  • Assignee set to Marco Hugentobler

#3 Updated by Marcel Dancak over 10 years ago

I have fixed this bug in this pull request: https://github.com/qgis/QGIS/pull/1201

I have tested mapserver's GetFeatureInfo response with OpenLayers.Format.GML parser and now it returns all matched features, not only one feature per layer as before.

#4 Updated by Giovanni Manghi over 10 years ago

  • Status changed from Open to Closed
  • Resolution set to fixed/implemented

the patch seems has been committed.

Also available in: Atom PDF