That's exactly how UMN Mapserver works, you change the size of the buffered pixel for each query layer, not ideal but it does work providing the buffer size takes account of the biggest symbol size in the layer and the placement of it. Ideally (for me at least) the WMS spec would allow a BBOX for a query area rather than a single point (like UMN Mapserver's cgi-mode query) this wouldn't solve the problem where a symbol is placed far away from the actual point but I suspect that's a rare occurance anyway.
--
Ross Elliott
Senior Software Engineer
Infoterra Ltd
T +44 (0)1252 362095
www.infoterra.co.uk
-----Original Message-----
From: Gabriel Roldán [mailto:groldan@anonymised.com]
Sent: 30 January 2007 23:20
To: geoserver-users@lists.sourceforge.net
Cc: Ross Elliott; Brent Owens
Subject: Re: [Geoserver-users] SLD
On a different note is anyone looking into getFeatureInfo for points
and lines, currently (I suspect) you have to get an excact point on a
line or point to get it to work. The UMN Mapserver guys fixed this by
adding a buffer to the passed in point so you can click near a feature
and still hit it.
This is a tough one.
What geoserver does (or used to do, long time not seeing the code) is to use the bounding box of the pixel at the point (or maybe two pixels around), in the layer's CRS, to make a bbox filter.
But the problem gets worst. It's supposed to work quite well if you render each point as a tiny symbol (square, triangle, circle, etc.). In this case the user has to affine his shooting. GetFeatureInfo is like playing darts.
Problem is that with different marker sizes and shapes, it is logical if the user expects a proper response if he pointed over the symbol, but the symbol has nothing to do with the actual geometry (sigh!)
Even worse, I had an experience where points were represented as triangles, and your only chance of catching up on a GetFeatureInfo were pointing at the center pixel of the lower side of the triangle.... no way pointing at the center, which would be more friendly... (though don't remember right now if the spec says something related to how the marker should be positioned regarding the point location)
So that's why I say its a tough problem.
So the question is, would it be enough of a solution if we just increase the "pixel tolerance" around the requested point to create the BBOX (actually
intersects?) filter?
Gabriel
--
Gabriel Roldán (groldan@anonymised.com)
Axios Engineering (http://www.axios.es)
Tel. +34 944 41 63 84
Fax. +34 944 41 64 90
The information in this e-mail and any attachment is confidential and may be privileged. If you have received this e-mail in error, please delete it immediately and destroy any copies on your system. You should not retain, copy or use this e-mail for any purpose, nor disclose all or any part of its content to any other person. Opinions expressed in this e-mail may not be endorsed by the company and unless explicitly indicated, this e-mail shall not form part of any binding agreement. Infoterra Limited a company registered in England under number 2359955 and having its registered office at Atlas House, 41 Wembley Road, Leicester, LE31UT. VAT number GB 476 0468 27