Feature request #5887
qgis on a GetFeatureInfo use always text/plain
Status: | Closed | ||
---|---|---|---|
Priority: | Normal | ||
Assignee: | - | ||
Category: | Web Services clients/WMS | ||
Pull Request or Patch supplied: | No | Resolution: | invalid |
Easy fix?: | No | Copied to github as #: | 15340 |
Description
Hi,
qgis when ask to a WMS server for a GetFeatureInfo, always ask using
INFO_FORMAT=text/plain.
This is a bug. It should request using one of the availables format from GetCapabilities.
If the getcapabilities say that is allowed only text/xml.
Qgis should use
INFO_FORMAT=text/xml.
And , if possbile , to parse it using an eventually available XSL transform (linked on the xml).
Related issues
History
#1 Updated by aperi2007 - over 12 years ago
I check better ths is ot a bug.
A server wms always add the text/plain as available format type .
So is impossible to have a server wms with only the text/xml.
And also asking for a text/plain always is not formally an error.
Perhaps is not the better choice, but surely is not a bug.
Also I guess should be better if qgis ask to the user what kind of format is better for that request.
I guess this should be a property of the layer.
Open a specific ticket.
#2 Updated by Giovanni Manghi over 12 years ago
- Status changed from Open to Feedback
aperi2007 - wrote:
I check better ths is ot a bug.
A server wms always add the text/plain as available format type .
So is impossible to have a server wms with only the text/xml.
And also asking for a text/plain always is not formally an error.
Perhaps is not the better choice, but surely is not a bug.
Also I guess should be better if qgis ask to the user what kind of format is better for that request.
I guess this should be a property of the layer.
Open a specific ticket.
so this ticket should be closed?
#3 Updated by Jürgen Fischer over 12 years ago
Giovanni Manghi wrote:
so this ticket should be closed?
This could still be a feature request.
We could offer a combobox in the WMS dialog and let the user select which format to use on GetFeatureInfo later (FEATURE_COUNT
is already an option that modifies the GetFeatureCount request).
#4 Updated by aperi2007 - over 12 years ago
We could offer a combobox in the WMS dialog and let the user select which format to use >on GetFeatureInfo later (FEATURE_COUNT is already an option that modifies the >GetFeatureCount request).
+1
#5 Updated by Jürgen Fischer over 12 years ago
- Tracker changed from Bug report to Feature request
#6 Updated by Jürgen Fischer over 12 years ago
aperi2007 - wrote:
A server wms always add the text/plain as available format type .
So is impossible to have a server wms with only the text/xml.
Currently we have two methods identifyAsText
and identifyAsHtml
. The former uses text/plain
and the latter used text/html
, text/plain
or text/xml
- whatever the server supports first. The identify tool used identifyAsHtml
and renders the result in a webkit widget (HTML as such and other formats as HTML with pre tags around the content).
#7 Updated by aperi2007 - over 12 years ago
OGC in their doc best practice will suggest to prefer to the text/html a text/xml that will send an XML linked to an XSL transform to allow the client to produce the html page.
In case of an XML actually qgis will use identifyAsHtml and resolve the XSL transform (i guess no :) ) or use identifyAsText and will report the XML as plain text ?
#8 Updated by Jürgen Fischer over 12 years ago
aperi2007 - wrote:
OGC in their doc "best practice" will suggest to prefer to the text/html a text/xml that will send an XML linked to an XSL transform to allow the client to produce the html page.
In case of an XML actually qgis will use identifyAsHtml and resolve the XSL transform (i guess no :) ) or use identifyAsText and will report the XML as plain text ?
Right, currently it just outputs the XML in "pre" text.
But QXmlQuery looks promising. I think that might actually not be that hard.
#9 Updated by aperi2007 - about 12 years ago
I guess is useful also the GML.
I have added to the ticket
#5892
a sample of GetFeatureInfo call that return a GML (multipart with 2 files).
#10 Updated by Paolo Cavallini about 12 years ago
- Target version set to Version 2.0.0
#11 Updated by Pirmin Kalberer about 12 years ago
- Target version changed from Version 2.0.0 to Future Release - Nice to have
#12 Updated by aperi2007 - about 12 years ago
- Status changed from Feedback to Closed
- Resolution set to invalid
I close this ticket to open a new ticket with better description of what need.
#13 Updated by Fabian Thalemann almost 8 years ago
Hello all,
although this ticket is quite old and closed I need to make a comment and I would like to make a related feature request to the community.
I'm facing the same problem as the original poster after all that years: QGIS still does not support GetFeatureInfo requests in any other format than text/plain. This is known and even highlighted in the most recent QGIS documentation (see http://docs.qgis.org/testing/en/docs/user_manual/working_with_ogc/ogc_client_support.html#ogc-wms): "Identity Formats — The list of MIME-types the server can respond with when you use the Identify tool. Currently, QGIS supports the text-plain type."
This situation is very unfortunate: I would like to make use of several WMS right now which have text/xml as the only allowed request format. What aperi2007 wrote in the first reply above ("A server wms always add the text/plain as available format type. So is impossible to have a server wms with only the text/xml.") is apparently wrong.
I have contacted the persons who run the WMS of interest to ask them if they could be so kind to change their server configuration, but they are rather pointing back at the software I'm using. So if anyone is able to add a wider range of GetFeatureInfo request formats to the QGIS desktop software I would be very thankful!
Best regards
Fabian