The renderer itself is the only compontent that can answer a GetFeatureInfo request properly 100% of the times, independent of how complex and fancy the styling is.
A getFeatures method would return a feature collection of features that are drawn in a certain area around a central pixel (hit area), using pixel based techniques to solve the query.
In particular.
- for raster features, and for vector features and non text symbolizers, render just the hit area + meta buffer, and say a Feature is catched only when it stains the hit area during its rendering. Should not be that complex, have a refererence to the feature, setup a transparent buffered image, render, check if any pixel turned to non trasparent, if so, add the feature to the resutls
- for labels, the same, but you have to render the whole map area to make sure we don't alter label positions.
If the catch area is big this method may become quite slow, but it's the only one that guarantees 100% hit accuracy. Alternative methods may use vector oriented techniques, but having attribute dependend symbolizers would make them extremely difficult to implement properly.
Jesse, I've assigned this one to you so that you can have a look at it, but I guess I'll end up implementing this one myself if you agree.