Class CoverageData<TImage extends CoverageDataImage>
- java.lang.Object
-
- mil.nga.geopackage.extension.BaseExtension
-
- mil.nga.geopackage.extension.coverage.CoverageDataCore<TImage>
-
- mil.nga.geopackage.extension.coverage.CoverageData<TImage>
-
- Type Parameters:
TImage
- image type
- Direct Known Subclasses:
CoverageDataPng
,CoverageDataTiff
public abstract class CoverageData<TImage extends CoverageDataImage> extends CoverageDataCore<TImage>
Tiled Gridded Coverage Data, abstract Common Encoding, Extension- Since:
- 2.0.1
- Author:
- osbornb
-
-
Field Summary
Fields Modifier and Type Field Description protected TileDao
tileDao
Tile DAO-
Fields inherited from class mil.nga.geopackage.extension.coverage.CoverageDataCore
algorithm, coverageBoundingBox, coverageProjection, encoding, EXTENSION_AUTHOR, EXTENSION_DEFINITION, EXTENSION_NAME, EXTENSION_NAME_NO_AUTHOR, GRIDDED_COVERAGE, height, requestProjection, sameProjection, width, zoomIn, zoomInBeforeOut, zoomOut
-
Fields inherited from class mil.nga.geopackage.extension.BaseExtension
extensionsDao, geoPackage
-
-
Constructor Summary
Constructors Constructor Description CoverageData(GeoPackage geoPackage, TileDao tileDao, Integer width, Integer height, Projection requestProjection)
Constructor
-
Method Summary
All Methods Static Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description abstract TImage
createImage(TileRow tileRow)
Create a coverage data imagestatic CoverageData<?>
createTileTable(GeoPackage geoPackage, TileTableMetadata metadata, GriddedCoverageDataType dataType)
Create the coverage data tile table with metadata and extensionabstract 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]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) + xstatic 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 heightstatic CoverageData<?>
getCoverageData(GeoPackage geoPackage, TileDao tileDao, Integer width, Integer height, Projection requestProjection)
Get a Tiled Gridded Coverage Datastatic 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 projectionTileDao
getTileDao()
Get the tile daoabstract Double
getValue(GriddedTile griddedTile, byte[] imageBytes, int x, int y)
Get the coverage data valueabstract double
getValue(GriddedTile griddedTile, TileRow tileRow, int x, int y)
Get the coverage data value of the pixel in the tile row imagedouble
getValue(TileRow tileRow, int x, int y)
Get the coverage data value of the pixel in the tile row imageCoverageDataResults
getValues(CoverageDataRequest request, Integer width, Integer height)
abstract Double[]
getValues(GriddedTile griddedTile, byte[] imageBytes)
Get the coverage data valuesCoverageDataResults
getValuesUnbounded(CoverageDataRequest request)
-
Methods inherited from class mil.nga.geopackage.extension.coverage.CoverageDataCore
createGriddedCoverageTable, createGriddedTileTable, createTileTable, formatUnboundedResults, getAlgorithm, getBicubicInterpolationValue, getBicubicInterpolationValue, getBicubicInterpolationValue, getBilinearInterpolationValue, getBilinearInterpolationValue, getBilinearInterpolationValue, getBilinearInterpolationValue, getCoverageBoundingBox, getCoverageProjection, getCubicInterpolationValue, getCubicInterpolationValue, getDataNull, getEncoding, getFloatPixelValue, getGriddedCoverage, getGriddedCoverageDao, getGriddedCoverageDao, getGriddedCoverageDao, getGriddedTile, getGriddedTile, getGriddedTileDao, getGriddedTileDao, getGriddedTileDao, getHeight, getNearestNeighbors, getNearestNeighborValue, getOrCreate, getPixelValue, getPixelValue, getPixelValue, getPixelValue, getRequestProjection, getTables, getTileMatrixSet, getUnsignedPixelValue, getUnsignedPixelValue, getUnsignedPixelValue, getUnsignedPixelValue, getUnsignedPixelValues, getValue, getValue, getValue, getValue, getValue, getValues, getValues, getValues, getValues, getValues, getValues, getValuesUnbounded, getWidth, getXSource, getXSourceMinAndMax, getYSource, getYSourceMinAndMax, has, isDataNull, isSameProjection, isZoomIn, isZoomInBeforeOut, isZoomOut, padBoundingBox, queryGriddedCoverage, reprojectCoverageData, setAlgorithm, setEncoding, setHeight, setWidth, setZoomIn, setZoomInBeforeOut, setZoomOut
-
Methods inherited from class mil.nga.geopackage.extension.BaseExtension
createDao, get, getExtensions, getExtensions, getExtensionsDao, getGeoPackage, getOrCreate, has, has, has, verifyWritable
-
-
-
-
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
- GeoPackagetileDao
- tile daowidth
- coverage data response widthheight
- coverage data response heightrequestProjection
- 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
- GeoPackagetileDao
- tile daowidth
- coverage data response widthheight
- coverage data response heightrequestProjection
- 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
- GeoPackagetileDao
- 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
- GeoPackagetileDao
- tile daorequestProjection
- 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
- GeoPackagemetadata
- tile table metadatadataType
- 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 tiletileRow
- tile rowx
- x coordinatey
- 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 tileimageBytes
- image bytesx
- x coordinatey
- y coordinate- Returns:
- coverage data value
-
getValues
public abstract Double[] getValues(GriddedTile griddedTile, byte[] imageBytes)
Get the coverage data values- Parameters:
griddedTile
- gridded tileimageBytes
- 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 tilevalues
- coverage data values of length tileWidth * tileHeighttileWidth
- tile widthtileHeight
- 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 tilevalues
- 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 classCoverageDataCore<TImage extends CoverageDataImage>
-
getValuesUnbounded
public CoverageDataResults getValuesUnbounded(CoverageDataRequest request)
- Specified by:
getValuesUnbounded
in classCoverageDataCore<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 rowx
- x coordinatey
- y coordinate- Returns:
- coverage data value
-
-