Class CoverageData<TImage extends CoverageDataImage>

Direct Known Subclasses:
CoverageDataPng, CoverageDataTiff

public abstract class CoverageData<TImage extends CoverageDataImage> extends CoverageDataCore<TImage>
Tiled Gridded Coverage Data, abstract Common Encoding, Extension

http://docs.opengeospatial.org/is/17-066r1/17-066r1.html

Since:
2.0.1
  • Field Details

    • tileDao

      protected final TileDao tileDao
      Tile DAO
  • Constructor Details

    • 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 Details

    • 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 TIFF 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 TIFF bytes from the double array of 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
    • getValues

      public CoverageDataResults getValues(CoverageDataRequest request, Integer width, Integer height)
      Specified by:
      getValues in class CoverageDataCore<TImage extends CoverageDataImage>
    • getValuesUnbounded

      public CoverageDataResults getValuesUnbounded(CoverageDataRequest request)
      Specified by:
      getValuesUnbounded in class CoverageDataCore<TImage extends CoverageDataImage>
    • 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