}
@Override
public boolean add(SimpleFeature f) {
//maintain the bounds
BoundingBox boundingBox = f.getBounds();
if (bounds == null){
bounds = new ReferencedEnvelope(
boundingBox.getMinX(), boundingBox.getMaxX(),
boundingBox.getMinY(), boundingBox.getMaxY(),
schema.getCoordinateReferenceSystem());
} else {
bounds.expandToInclude(boundingBox.getMinX(), boundingBox.getMinY());
bounds.expandToInclude(boundingBox.getMaxX(), boundingBox.getMaxY());
}
return list.add(f);
}