[Geoserver-devel] [jira] (GEOS-6598) Enhancement for the VectorRenderingLayerIdentifier

Christian Vogt created an issue

GeoServer / BugGEOS-6598

Enhancement for the VectorRenderingLayerIdentifier

Issue Type:

BugBug

Affects Versions:

2.5.2

Assignee:

Andrea Aime

Attachments:

VectorRenderingLayerIdentifier.java

Components:

Global

Created:

02/Aug/14 2:46 AM

Priority:

MinorMinor

Reporter:

Christian Vogt

The vector-based GetFeatureInfo has some known issues (e.g. selecting features was not possible when another geometry field than the default geometry was used).
So the VectorRenderingLayerIdentifier is a good solution (thank you, Andre).
I played around with this new feature and found an issue:
I defined a layer with trees. The size of the symbol depends on the property diameter.
So older trees can have a big symbol, where young trees can be quite small.
With such a style, the estimated search radius for the VectorRenderingLayerIdentifier is quite big.
When you now try to select a young tree in a group of trees (when the distance between each other
is smaller than the maximum symbol size for big trees), you get more results than expected!

The reason is, that the FeatureInfoRenderListener does not clear the buffered Image after a hit.
If once a hit is found, all other features that are drawn in the paintArea
(even if they don’t touch the hitArea) will be recognised as hits.
A second issue with the FeatureInfoRenderListener is, that after clearing the paintArea
transparent pixels (color = -2**24, Alpha=255) will be identified as hits too.
So the comparison has to ignore the color -16777216: (if (!hit && alpha > 0 && color != -16777216)…

I provide the enhanced file VectorRenderingLayerIdentifier.java as an attachment.
The only two changes were made in the FeatureInfoRenderListener method featureRenderer.

Regards
Christian

Add Comment

Add Comment

This message was sent by Atlassian JIRA (v6.1.6#6162-sha1:7af547c)

Atlassian logo