// Use composition rule specific implementation
CoveragesConsistencyChecker checker = null;
for (CoverageBand band : bands) {
// Refactor this once supporting complex compositions
final InputCoverageBand inputBand = band.getInputCoverageBands().get(0);
final String coverageName = inputBand.getCoverageName();
final GridCoverage2DReader reader = wrap(delegate, coverageName, coverageInfo);
// Remove this when removing constraints
if (checker == null) {
checker = new CoveragesConsistencyChecker(reader);
} else {
checker.checkConsistency(reader);
}
GridCoverage2D coverage = (GridCoverage2D) reader.read(parameters);
if (coverage != null) {
// We may consider revisiting this to use integers instead of String
// For the moment, let's continue using String
String selectedBand = inputBand.getBand();
if (BANDSELECT != null) {
final ParameterValueGroup param = BANDSELECT.getParameters();
param.parameter("Source").setValue(coverage);
param.parameter("SampleDimensions").setValue(new int[]{Integer.valueOf(selectedBand)});
coverage = (GridCoverage2D) PROCESSOR.doOperation(param, hints);