ioe.initCause(e);
throw ioe;
}
}
RenderingTransformationHelper helper = new RenderingTransformationHelper() {
protected GridCoverage2D readCoverage(GridCoverage2DReader reader, Object params, GridGeometry2D readGG)
throws IOException {
return readBestCoverage(
reader,
params,
ReferencedEnvelope.reference(readGG.getEnvelope()),
readGG.getGridRange2D(),
interpolation,
readerBgColor);
}
};
Object result = helper.applyRenderingTransformation(transformation, layer.getFeatureSource(),
layer.getQuery(), Query.ALL, readGG, coverageCRS, interpolationHints);
if(result == null) {
coverage = null;
} else if(result instanceof GridCoverage2D) {
coverage = (GridCoverage2D) result;