Feature request #5887

qgis on a GetFeatureInfo use always text/plain

Added by aperi2007 - almost 5 years ago. Updated 5 months ago.

Status:Closed Start Date:06/27/2012
Priority:Normal Due date:
Assigned to:- % Done:

0%

Category:WMS Client
Target version:Future Release - Nice to have
Platform: Resolution:invalid
Platform version: Pull Request or Patch supplied:No
Status info: Tag:

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

related to QGIS Application - Feature request #6575: Print the contents of identify windows Closed 10/26/2012
duplicated by QGIS Application - Feature request #5892: Enhance the identify on WMS using GetFeatureInfo Closed 06/28/2012

History

Updated by aperi2007 - almost 5 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.

Updated by Giovanni Manghi almost 5 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?

Updated by Jürgen Fischer almost 5 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).

Updated by aperi2007 - almost 5 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

Updated by Jürgen Fischer almost 5 years ago

  • Tracker changed from Bug report to Feature request

Updated by Jürgen Fischer almost 5 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).

Updated by aperi2007 - almost 5 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 ?

Updated by Jürgen Fischer almost 5 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.

Updated by aperi2007 - over 4 years ago

I guess is useful also the GML.

I have added to the ticket
http://hub.qgis.org/issues/5892
a sample of GetFeatureInfo call that return a GML (multipart with 2 files).

Updated by Paolo Cavallini over 4 years ago

  • Target version set to Version 2.0.0

Updated by Pirmin Kalberer over 4 years ago

  • Target version changed from Version 2.0.0 to Future Release - Nice to have

Updated by aperi2007 - over 4 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.

Updated by Fabian Thalemann 5 months 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

Also available in: Atom