code: public static void printCoverageData(GridCoverage2D coverage) {
          RenderedImage renderedImage = coverage.getRenderedImage();
          RandomIter renderedImageIterator = RandomIterFactory.create(renderedImage, null);
          int[] colsRows = CoverageUtilities.getRegionColsRows(coverage);
          for (int r = 0; r < colsRows[1]; r++) {
              for (int c = 0; c < colsRows[0]; c++) {
                  printer.print(renderedImageIterator.getSampleDouble(c, r, 0));
                  printer.print(separator);
              }
              printer.println();
          }
      }
docs: Print data of a {@link GridCoverage2D}.
  
  @param coverage
  the coverage.