And here's that method again without the spurious hack :-)
FeatureCollection<SimpleFeatureType, SimpleFeature> findFeatures(
FeatureCollection<SimpleFeatureType, SimpleFeature> collection,
DirectPosition2D pos, double maxDistance, String geomAttributeName) {
Point jtsPoint = gf.createPoint(new Coordinate(pos.x, pos.y));
Filter filter = ff2.dwithin(ff2.property(geomAttributeName),
ff2.literal(jtsPoint), radius, null);
return fc.subCollection(filter);
}
Michael
------------------------------------------------------------------------------
Let Crystal Reports handle the reporting - Free Crystal Reports 2008 30-Day
trial. Simplify your report design, integration and deployment - and focus on
what you do best, core application coding. Discover what's new with
Crystal Reports now. http://p.sf.net/sfu/bobj-july
_______________________________________________
Geotools-gt2-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/geotools-gt2-users