fids.add(new FeatureIdImpl("comuni11.2671"));
FilterFactory2 ff = CommonFactoryFinder.getFilterFactory2();
PropertyName bboxProperty = ff.property(sf.getDefaultGeometryProperty().getName());
Query query = new Query(typeName.getLocalPart(), ff.and(
ff.greater(ff.property("cod_reg"), ff.literal(0)),
ff.and(
ff.bbox(bboxProperty, sf.getBounds()),
ff.id(fids))));
iterate(source.getFeatures(query), 1, true);