geopackage-sdk/src/main/java/mil/nga/geopackage/extension/coverage/CoverageDataTiff.java
public CoverageDataTiffImage drawTile(GriddedTile griddedTile, Double[] values,
                                          int tileWidth, int tileHeight) {

        CoverageDataTiffImage image = createImage(tileWidth, tileHeight);
        for (int x = 0; x < tileWidth; x++) {
            for (int y = 0; y < tileHeight; y++) {
                Double value = values[(y * tileWidth) + x];
                float pixelValue = getPixelValue(griddedTile, value);
                setPixelValue(image, x, y, pixelValue);
            }
        }
        image.writeTiff();

        return image;
    }
public CoverageDataTiffImage drawTile(GriddedTile griddedTile, Double[] values,
                                          int tileWidth, int tileHeight) {

        CoverageDataTiffImage image = createImage(tileWidth, tileHeight);
        for (int x = 0; x < tileWidth; x++) {
            for (int y = 0; y < tileHeight; y++) {
                Double value = values[(y * tileWidth) + x];
                float pixelValue = getPixelValue(griddedTile, value);
                setPixelValue(image, x, y, pixelValue);
            }
        }
        image.writeTiff();

        return image;
    }
Draw a coverage data image tile from the flat array of coverage data values of length
tileWidth * tileHeight where each coverage data value is at: (y * tileWidth) + x

@param griddedTile gridded tile
@param values      coverage data values of length tileWidth * tileHeight
@param tileWidth   tile width
@param tileHeight  tile height
@return coverage data image tile