Thanks Mathias! I will investigate it. Maybe an heuristic for the tolerance could be used on the base of the BBOX coordinates...
giovanni 2015-09-17 15:39 GMT+02:00 Mathias Walker <m...@sourcepole.ch>: > Hi Giovanni > > > > QGIS Server uses a fixed percentage (1 or 2%) of the image size as a > default tolerance for GetFeatureInfo requests. This works nicely with a > full sized image e.g. in the QGIS WebClient. But with the smaller image > size in the OL3 GetFeatureInfo request this results in a single pixel > tolerance which requires pixel perfect clicks. > > > > There are new parameters in QGIS Server to set the tolerance in > GetFeatureInfo requests (should be available from QGIS 2.10): > > > > FI_POINT_TOLERANCE > > FI_LINE_TOLERANCE > > FI_POLYGON_TOLERANCE > > > > The tolerances can be set in pixels per geometry type. > > > > If you add these parameters to your OL3 getGetFeatureInfoUrl() calls, the > feature info requests should respond to less precise clicks. > > > > Cheers > > Mathias > > > > Am Donnerstag, 17. September 2015, 12.07:32 schrieb G. Allegri: > > OL3 has changed the way GetFeatureInfo request parameters are generated. > > The nre way uses fixed WIDTH/HEIGHT and X/Y (I/J) params: 101 for the > first and 50 latters. Then it builds the BBOX parameter consequently. > > > The old way they were built from the size and extent of the map, and the > query coordinate. > > > The new style makes QGIS Server respond with empty results if the click is > not exactly on the feature coordinates. > > I've tested the same request on the same layer served by Geoserver, which > responds even with not so precise clicks. > > > Can this be caused by coordinates rounding happening inside QGIS Server? > > > giovanni > > > -- > > Giovanni Allegri > http://about.me/giovanniallegri > > Gis3W - http://gis3w.it > > Ikare - http://ikare.it > > Twitter: https://twitter.com/_giohappy_ > > blog: http://blog.spaziogis.it > GEO+ geomatica in Italia http://bit.ly/GEOplus > > > > -- > > Sourcepole - Linux & Open Source Solutions > > Weberstrasse 5, 8004 Zürich, Switzerland > > Tel: 044 440 77 11 Direkt: 044 515 67 71 > > mwa at sourcepole.ch http://www.sourcepole.ch > -- Giovanni Allegri http://about.me/giovanniallegri Gis3W - http://gis3w.it Ikare - http://ikare.it Twitter: https://twitter.com/_giohappy_ blog: http://blog.spaziogis.it GEO+ geomatica in Italia http://bit.ly/GEOplus
_______________________________________________ Qgis-developer mailing list Qgis-developer@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/qgis-developer