final int numBands = tiled.getNumBands();
final double[] samples = new double[numBands];
final double[] padNaNs = new double[numBands];
Arrays.fill(padNaNs, Double.NaN);
final WritableRectIter iterator = RectIterFactory.createWritable(tiled, gridBounds);
if (!iterator.finishedLines()) try {
int y = gridBounds.y;
do {
iterator.startPixels();
if (!iterator.finishedPixels()) {
int x = gridBounds.x;