WMS GetFeatureInfo with no fill Polygon (not returning results)


This seems to be a reintroduction of a similar bug as discussed here


We have styles with polygons with no fill but that do have a border.

Using WMSGetfeatureinfo we get no features for these polygons unless we click on the border or label.

We have worked around this by changing our styles to 1% opaciity

A style where this occurs is:


Ubuntu 14.04 VM (4G ram,4 processors), Java oracle 8, Geoserver 2.9 stable, openlayers 2.13


Andrea Aime
July 26, 2016, 10:18 AM

Mind, there are no special optimizations for opacity at 0, meaning the code will still process those polygons as if they were to be fill, and send them down to the java2d api to be filled. So, a style that has fully transparent fills (e.g., with no attribute dependency that might alter the opacity on a polygon by polygon basis) is less efficient than it should be.

David McQuillan
July 26, 2016, 10:20 AM

Thanks for the tip,

We will be changing our code to not add opacity 0 and to just remove the fill where it not required

Thank you

Jody Garnett
August 28, 2016, 8:34 AM

So ~aaime what is the "fix" here? The feature does not draw anything at that location - so with the drawing based getfeatureinfo it will not find anything.

Do we hijack the style for getfeature info with a visitor and set the opacity to 1.0 ?

Andrea Aime
August 28, 2016, 10:17 AM

The fix is to change the style visitor in the feature info to add a fill in this case (it's already doing that under other conditions), see https://github.com/geoserver/geoserver/blob/master/src/wms/src/main/java/org/geoserver/wms/featureinfo/FeatureInfoStylePreprocessor.java

Forcing opacity to 1 will indeed also do the trick.

Andrea Aime
February 15, 2017, 11:47 AM

Mass closing all resolved issues not modified in the last 4 weeks



Andrea Aime


David McQuillan



Fix versions

Affects versions