Class CoverageData<TImage extends CoverageDataImage>

    • Field Detail

      • tileDao

        protected final TileDao tileDao
        Tile DAO
    • Constructor Detail

      • CoverageData

        public CoverageData​(GeoPackage geoPackage,
                            TileDao tileDao,
                            Integer width,
                            Integer height,
                            Projection requestProjection)
        Constructor
        Parameters:
        geoPackage - GeoPackage
        tileDao - tile dao
        width - coverage data response width
        height - coverage data response height
        requestProjection - request projection
    • Method Detail

      • getCoverageData

        public static CoverageData<?> getCoverageData​(GeoPackage geoPackage,
                                                      TileDao tileDao,
                                                      Integer width,
                                                      Integer height,
                                                      Projection requestProjection)
        Get a Tiled Gridded Coverage Data
        Parameters:
        geoPackage - GeoPackage
        tileDao - tile dao
        width - coverage data response width
        height - coverage data response height
        requestProjection - request projection
        Returns:
        coverage data
      • getCoverageData

        public static CoverageData<?> getCoverageData​(GeoPackage geoPackage,
                                                      TileDao tileDao)
        Get a Tiled Gridded Coverage Data, use the coverage data pixel tile size as the request size width and height
        Parameters:
        geoPackage - GeoPackage
        tileDao - tile dao
        Returns:
        coverage data
      • getCoverageData

        public static CoverageData<?> getCoverageData​(GeoPackage geoPackage,
                                                      TileDao tileDao,
                                                      Projection requestProjection)
        Get a Tiled Gridded Coverage Data, use the coverage data pixel tile size as the request size width and height, request as the specified projection
        Parameters:
        geoPackage - GeoPackage
        tileDao - tile dao
        requestProjection - request projection
        Returns:
        coverage data
      • createTileTable

        public static CoverageData<?> createTileTable​(GeoPackage geoPackage,
                                                      TileTableMetadata metadata,
                                                      GriddedCoverageDataType dataType)
        Create the coverage data tile table with metadata and extension
        Parameters:
        geoPackage - GeoPackage
        metadata - tile table metadata
        dataType - gridded coverage data type
        Returns:
        coverage data
        Since:
        4.0.0
      • createImage

        public abstract TImage createImage​(TileRow tileRow)
        Create a coverage data image
        Parameters:
        tileRow - tile row
        Returns:
        image
      • getValue

        public abstract double getValue​(GriddedTile griddedTile,
                                        TileRow tileRow,
                                        int x,
                                        int y)
        Get the coverage data value of the pixel in the tile row image
        Parameters:
        griddedTile - gridded tile
        tileRow - tile row
        x - x coordinate
        y - y coordinate
        Returns:
        coverage data value
      • getValue

        public abstract Double getValue​(GriddedTile griddedTile,
                                        byte[] imageBytes,
                                        int x,
                                        int y)
        Get the coverage data value
        Parameters:
        griddedTile - gridded tile
        imageBytes - image bytes
        x - x coordinate
        y - y coordinate
        Returns:
        coverage data value
      • getValues

        public abstract Double[] getValues​(GriddedTile griddedTile,
                                           byte[] imageBytes)
        Get the coverage data values
        Parameters:
        griddedTile - gridded tile
        imageBytes - image bytes
        Returns:
        coverage data values
      • drawTileData

        public abstract byte[] drawTileData​(GriddedTile griddedTile,
                                            Double[] values,
                                            int tileWidth,
                                            int tileHeight)
        Draw a coverage data image tile and format as image bytes from the flat array of coverage data values of length tileWidth * tileHeight where each coverage data value is at: (y * tileWidth) + x
        Parameters:
        griddedTile - gridded tile
        values - coverage data values of length tileWidth * tileHeight
        tileWidth - tile width
        tileHeight - tile height
        Returns:
        coverage data image tile bytes
      • drawTileData

        public abstract byte[] drawTileData​(GriddedTile griddedTile,
                                            Double[][] values)
        Draw a coverage data image tile and format as image bytes from the double array of unsigned coverage data values formatted as Double[row][width]
        Parameters:
        griddedTile - gridded tile
        values - coverage data values as [row][width]
        Returns:
        coverage data image tile bytes
      • getTileDao

        public TileDao getTileDao()
        Get the tile dao
        Returns:
        tile dao
      • getValue

        public double getValue​(TileRow tileRow,
                               int x,
                               int y)
        Get the coverage data value of the pixel in the tile row image
        Parameters:
        tileRow - tile row
        x - x coordinate
        y - y coordinate
        Returns:
        coverage data value