While running the SelectionLab example with 11-RC1, I get a null pointer exception when I use the �select tool� to click on a feature. Specifically, the exception is raised on the call to selectedFeatures.features(); I�ve traced it to the ExtractBoundsFilterVisitor.visit function returning null. Does this look like a bug?
from SelectionLab.java:
AffineTransform screenToWorld = mapFrame.getMapPane().getScreenToWorldTransform();
Rectangle2D worldRect = screenToWorld.createTransformedShape(screenRect).getBounds2D();
ReferencedEnvelope bbox = new ReferencedEnvelope(
worldRect,
mapFrame.getMapPane().getMapContent().getCoordinateReferenceSystem());
/*
* Create a Filter to select features that intersect with
* the bounding box
*/
Filter filter = ff.intersects(ff.property(geometryAttributeName), ff.literal(bbox));
/*
* Use the filter to identify the selected features
*/
try {
SimpleFeatureCollection selectedFeatures =
featureSource.getFeatures(filter);
SimpleFeatureIterator iter = selectedFeatures.features();
From ExtractBoundsFilterVisitor
@Override
public Object visit(PropertyName _expression_, Object data) {
return null;
}
Here�s the stack trace: