code: public static int[] getRegionColsRows( GridCoverage2D gridCoverage ) {
          GridGeometry2D gridGeometry = gridCoverage.getGridGeometry();
          GridEnvelope2D gridRange = gridGeometry.getGridRange2D();
          int height = gridRange.height;
          int width = gridRange.width;
          int[] params = new int[]{width, height};
          return params;
      }
docs: Get the array of rows and cols.
  
  @param gridCoverage the coverage.
  @return the array as [cols, rows]