<div dir="ltr">Hello,<br><br>I found some inconsistencies in QGIS Mapserver in GetFeatureInfo WMS responses in GML format:<br><br>Identification by point coordinates (X/Y or I/J parameters):<br>------------------------------------------------------------<br>
 - returns geometry data of every feature in layer's CRS only if 'Add geometry to feature response' in project settings is checked<br> - returns bounding box of every feature in layer's CRS only if 'Add geometry to feature response' in project settings is checked<br>
 - doesn't returns global bounding box of all matched features collection<br><br>Searching by attributes (FILTER parameter)<br>------------------------------------------<br> - always returns geometry data of every feature in layer's CRS<br>
 - always returns bounding box of every feature in layer's CRS<br> - always returns global bounding box of all matched features collection in requested CRS (SRS/CRS parameter), but this value (whole XML element) is correct only for text/xml format, because bounding box value is computed only for text/xml format, but it's XML element is included in server response regardless of <span class="">concrete</span> XML output format.<br>
<br><br>I'm able to fix these issues and prepare pull request(s). This is my suggestion:<br> - return geometry data of every feature in requested CRS only if 'Add geometry to feature response' is checked<br> - return bounding box of every feature in requested CRS only if 'Add geometry to feature response' is checked<br>
 - return global bounding box of all matched features collection in requested CRS only if 'Add geometry to feature response' is checked, and in proper XML element depending on output format - <BoundingBox CRS="EPSG:4326" maxx="1" minx="-1" maxy="1" miny="-1"/> for text/xml and <gml:boundedBy><gml:Box srsName="EPSG:4326"><gml:coordinates cs="," ts=" ">-1,-1 1,1</gml:coordinates></gml:boundedBy> for GML format.<br>
<br><br>Marcel Dancak<br></div>