SimpleFeatureCollection clippedFeatures;
if (clip && roi != null) {
if (LOGGER.isLoggable(Level.FINE)) {
LOGGER.log(Level.FINE, "Clipping features");
}
final ClipProcess clipProcess = new ClipProcess();// TODO avoid unnecessary creation
clippedFeatures = clipProcess.execute(reprojectedFeatures,
roiManager.getSafeRoiInTargetCRS(), true);
// checks
DownloadUtilities.checkIsEmptyFeatureCollection(clippedFeatures);
} else {