Bug report #6030

WMS client : add the Feature_Count param in the GetFeatureInfo request

Added by aperi2007 - over 11 years ago. Updated over 11 years ago.

Status:Closed
Priority:Normal
Assignee:-
Category:Web Services clients/WMS
Affected QGIS version:master Regression?:No
Operating System: Easy fix?:No
Pull Request or Patch supplied:No Resolution:worksforme
Crashes QGIS or corrupts data:No Copied to github as #:15405

Description

Hi, I notice the qgis when do an identify on a LayerWMS,
it will return always one only feature also when there is more than one feature on the point clicked.

I found the reason is on the miss of a parameter.
Infact the WMS specs extablish that the max number of feature the WMS will return from a GetFeatureInfo is given from the
FEATURE_COUNT parameter. If that parameter is missing in the request is assumed it is 1.
So the wms return always one feature.

I guess should be better that qgis will insert always a parameter FEATURE_COUNT=10
(I guess 10 feature overlapping are sufficient for all the situations).

An exmaple of request with feature_count is this:

[http://web.regione.toscana.it/wmsraster/com.rt.wms.RTmap/wms?map=wmscastore&language=ita&SERVICE=WMS&VERSION=1.3.0&REQUEST=GetFeatureInfo&BBOX=632180.3356719792354852,4796080.1425704099237919,632257.8389933158177882,4796138.3034105179831386&CRS=EPSG:25832&WIDTH=581&HEIGHT=437&LAYERS=r_toscan_cst_delimitazione_fogli&STYLES=&FORMAT=image/png&QUERY_LAYERS=r_toscan_cst_delimitazione_fogli&FEATURE_COUNT=10&INFO_FORMAT=text/html&I=240&J=200]

History

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

  • Resolution set to worksforme
  • Status changed from Open to Closed

Already implemented in commit:7f3d79ab. The number of features can be specified in the WMS dialog.

#2 Updated by aperi2007 - over 11 years ago

Great !

But I guess should better set the
feature_limit to a number gret then zero.

Infact very often the user need to know all the feature in a point.
Very few time the user need to know only one.
Expecially because the WMS send the first it find not the top-most.
So the user could have a wrong perception of the dataset if it see only one feature.

Instead setting it to a value bigger then 0 for example 10 or 100 (why not?)
is better because if there is only one feature the response is the same otherwise the user will have all the feature available.
If the user like to have only one (randomic) feature of that availables it could reduce it the value from 100 to 1 or 0 (0 mean 1 for wms here).

Also available in: Atom PDF