I am using GeoServer 2.5.1 (stable version web archive download) and Tomcat 7.0.54 on a Windows 2008 R2 server.
I have several WMS layers in GeoServer that only contain polygons and are based on a shapefile data source. I am submitting WMS (Version 1.1.1) GetFeatureInfo requests from an OpenLayers map when a polygon is clicked on. When I select certain polygons on the WMS layer, a polygon adjacent to it and in some cases a polygon that isn’t even touching the clicked on polygon will be returned in the GetFeatureInfo response from GeoServer. Previously I was using GeoServer 2.4.3 and was not experiencing this behavior. In researching this issue, it seems to be related to the maxBuffer value in the wms.xml file. First I tried changing the buffer and maxBuffer parameters using vendorParams in the GetFeatureInfo request, but it did not change the response. I also tried reducing the maxBuffer value in wms.xml to 5 (which I think is the default value for the buffer parameter) and restarting Tomcat, but it did not change the behavior either. Is there another parameter that controls the results of a GetFeatureInfo request so that only the requested feature is returned, or am I misinterpreting how the maxBuffer value affects the results? For now, I have reverted back to the old GetFeatureInfo engine by adding the following to my JVM startup parameters:
-Dorg.geoserver.wms.featureinfo.render.enabled=false
By adding the above parameter, the GetFeatureInfo response is now being returned as before.
Thanks,
Jerome Wendell