geopackage-sdk/src/main/java/mil/nga/geopackage/extension/coverage/CoverageDataPng.java
public CoverageDataPngImage drawTile(GriddedTile griddedTile, Double[][] values) {

        int tileWidth = values[0].length;
        int tileHeight = values.length;

        CoverageDataPngImage image = createImage(tileWidth, tileHeight);
        PngWriter writer = image.getWriter();
        for (int y = 0; y < tileHeight; y++) {
            ImageLineInt row = new ImageLineInt(writer.imgInfo, new int[tileWidth]);
            int[] rowLine = row.getScanline();
            for (int x = 0; x < tileWidth; x++) {
                Double value = values[y][x];
                short pixelValue = getPixelValue(griddedTile, value);
                setPixelValue(rowLine, x, pixelValue);
            }
            writer.writeRow(row);
        }
        writer.end();
        image.flushStream();

        return image;
    }
public CoverageDataPngImage drawTile(GriddedTile griddedTile, Double[][] values) {

        int tileWidth = values[0].length;
        int tileHeight = values.length;

        CoverageDataPngImage image = createImage(tileWidth, tileHeight);
        PngWriter writer = image.getWriter();
        for (int y = 0; y < tileHeight; y++) {
            ImageLineInt row = new ImageLineInt(writer.imgInfo, new int[tileWidth]);
            int[] rowLine = row.getScanline();
            for (int x = 0; x < tileWidth; x++) {
                Double value = values[y][x];
                short pixelValue = getPixelValue(griddedTile, value);
                setPixelValue(rowLine, x, pixelValue);
            }
            writer.writeRow(row);
        }
        writer.end();
        image.flushStream();

        return image;
    }
Draw a coverage data image tile from the double array of unsigned coverage data values
formatted as Double[row][width]

@param griddedTile gridded tile
@param values      coverage data values as [row][width]
@return coverage data image tile