From: Michael B. <mic...@gm...> - 2009-11-26 03:25:26
|
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 |