public Envelope getBounds(Filter filter) throws LayerException {
		try {
			FeatureCollection<SimpleFeatureType, SimpleFeature> fc = getFeatureSource().getFeatures(filter);
			return fc.getBounds();
		} catch (IOException ioe) {
			throw new LayerException(ioe, ExceptionCode.FEATURE_MODEL_PROBLEM);
		}
	}
public Envelope getBounds ( Filter filter ) throws LayerException { try { FeatureCollection < SimpleFeatureType , SimpleFeature > fc = getFeatureSource ( ) . getFeatures ( filter ) ; return fc . getBounds ( ) ; } catch ( IOException ioe ) { throw new LayerException ( ioe , ExceptionCode . FEATURE_MODEL_PROBLEM ) ; } }
Retrieve the bounds of the specified features.

@param filter filter
@return the bounds of the specified features
@throws LayerException cannot read features