Set<FeatureId> modifiedFids = new HashSet<FeatureId>();
while(it.hasNext()){
SimpleFeature feature = (SimpleFeature) it.next();
modifiedFids.add(ff.featureId(feature.getID()));
}
Id idFilter = ff.id(modifiedFids);
Query q = new Query(query);
q.setFilter(ff.and(idFilter, query.getFilter()));
bounds = getBoundsInternal(q);
// update with the diff contents, all added feature and all modified, not deleted ones