Hi Marcel
Thanks for spotting this issue, it will be good to have a consistent
behaviour with / without filter and for all output formats.
Adding geometry / bounding box has been done for showing rubberbands and
for handling search results (zoom to features that match the filter).
Therefore, the bounding boxes need to be included even if 'add geometry
to feature response' is not checked. The added bounding box was meant
for cases where the geometry data should be kept private, but searching
should be possible.
I agree with the other points, please prepare a pull request.
Regards,
Marco
On 27.02.2014 14:11, Marcel Dancak wrote:
Hello,
I found some inconsistencies in QGIS Mapserver in GetFeatureInfo WMS
responses in GML format:
Identification by point coordinates (X/Y or I/J parameters):
------------------------------------------------------------
- returns geometry data of every feature in layer's CRS only if 'Add
geometry to feature response' in project settings is checked
- returns bounding box of every feature in layer's CRS only if 'Add
geometry to feature response' in project settings is checked
- doesn't returns global bounding box of all matched features collection
Searching by attributes (FILTER parameter)
------------------------------------------
- always returns geometry data of every feature in layer's CRS
- always returns bounding box of every feature in layer's CRS
- 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 concrete XML output format.
I'm able to fix these issues and prepare pull request(s). This is my
suggestion:
- return geometry data of every feature in requested CRS only if 'Add
geometry to feature response' is checked
- return bounding box of every feature in requested CRS only if 'Add
geometry to feature response' is checked
- 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.
Marcel Dancak
--
Dr. Marco Hugentobler
Sourcepole - Linux & Open Source Solutions
Weberstrasse 5, CH-8004 Zürich, Switzerland
[email protected] http://www.sourcepole.ch
Technical Advisor QGIS Project Steering Committee
_______________________________________________
Qgis-developer mailing list
[email protected]
http://lists.osgeo.org/mailman/listinfo/qgis-developer