Class CoverageDataTiff
java.lang.Object
mil.nga.geopackage.extension.BaseExtension
mil.nga.geopackage.extension.coverage.CoverageDataCore<TImage>
mil.nga.geopackage.extension.coverage.CoverageData<CoverageDataTiffImage>
mil.nga.geopackage.extension.coverage.CoverageDataTiff
Tiled Gridded Coverage Data, TIFF Encoding, Extension
- Since:
- 2.0.1
-
Field Summary
Modifier and TypeFieldDescriptionstatic final int
Bits per value for floating point coverage datastatic final int
Single sample coverage dataFields inherited from class mil.nga.geopackage.extension.coverage.CoverageData
tileDao
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
ConstructorDescriptionCoverageDataTiff
(GeoPackage geoPackage, TileDao tileDao) Constructor, use the coverage data tables pixel tile size as the request size width and heightCoverageDataTiff
(GeoPackage geoPackage, TileDao tileDao, Integer width, Integer height, Projection requestProjection) ConstructorCoverageDataTiff
(GeoPackage geoPackage, TileDao tileDao, Projection requestProjection) Constructor, use the coverage data tables pixel tile size as the request size width and height, request as the specified projection -
Method Summary
Modifier and TypeMethodDescriptioncreateImage
(int tileWidth, int tileHeight) Create a new imagecreateImage
(TileRow tileRow) Create a coverage data imagestatic CoverageDataTiff
createTileTable
(GeoPackage geoPackage, TileTableMetadata metadata) Create the coverage data tile table with metadata and extensiondrawTile
(float[][] pixelValues) Draw a coverage data image tile from the double array of float pixel values formatted as float[row][width]drawTile
(float[] pixelValues, int tileWidth, int tileHeight) Draw a coverage data image tile from the flat array of float pixel values of length tileWidth * tileHeight where each pixel is at: (y * tileWidth) + xdrawTile
(GriddedTile griddedTile, Double[][] values) Draw a coverage data image tile from the double array of coverage data values formatted as Double[row][width]drawTile
(GriddedTile griddedTile, Double[] values, int tileWidth, int tileHeight) 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) + xbyte[]
drawTileData
(float[][] pixelValues) Draw a coverage data image tile and format as TIFF bytes from the double array of float pixel values formatted as float[row][width]byte[]
drawTileData
(float[] pixelValues, int tileWidth, int tileHeight) Draw a coverage data image tile and format as TIFF bytes from the flat array of float pixel values of length tileWidth * tileHeight where each pixel is at: (y * tileWidth) + xbyte[]
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]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) + xfloat
getPixelValue
(byte[] imageBytes, int x, int y) Get the pixel value as a float from the image and the coordinatefloat[]
getPixelValues
(byte[] imageBytes) Get the pixel values of the image as floatsgetValue
(GriddedTile griddedTile, byte[] imageBytes, int x, int y) Get the coverage data valuegetValue
(GriddedTile griddedTile, CoverageDataTiffImage image, int x, int y) double
getValue
(GriddedTile griddedTile, TileRow tileRow, int x, int y) Get the coverage data value of the pixel in the tile row imageDouble[]
getValues
(GriddedTile griddedTile, byte[] imageBytes) Get the coverage data valuesvoid
setPixelValue
(CoverageDataTiffImage image, int x, int y, float pixelValue) Set the pixel value into the imagestatic void
validateImageType
(FileDirectory directory) Validate that the image typeMethods inherited from class mil.nga.geopackage.extension.coverage.CoverageData
createTileTable, getCoverageData, getCoverageData, getCoverageData, getTileDao, getValue, getValues, getValuesUnbounded
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, 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 Details
-
SAMPLES_PER_PIXEL
public static final int SAMPLES_PER_PIXELSingle sample coverage data- See Also:
-
BITS_PER_SAMPLE
public static final int BITS_PER_SAMPLEBits per value for floating point coverage data- See Also:
-
-
Constructor Details
-
CoverageDataTiff
public CoverageDataTiff(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
-
CoverageDataTiff
Constructor, use the coverage data tables pixel tile size as the request size width and height- Parameters:
geoPackage
- GeoPackagetileDao
- tile dao
-
CoverageDataTiff
Constructor, use the coverage data tables pixel tile size as the request size width and height, request as the specified projection- Parameters:
geoPackage
- GeoPackagetileDao
- tile daorequestProjection
- request projection
-
-
Method Details
-
createImage
Create a coverage data image- Specified by:
createImage
in classCoverageData<CoverageDataTiffImage>
- Parameters:
tileRow
- tile row- Returns:
- image
-
getValue
Get the coverage data value of the pixel in the tile row image- Specified by:
getValue
in classCoverageData<CoverageDataTiffImage>
- Parameters:
griddedTile
- gridded tiletileRow
- tile rowx
- x coordinatey
- y coordinate- Returns:
- coverage data value
-
getValue
- Specified by:
getValue
in classCoverageDataCore<CoverageDataTiffImage>
-
getPixelValue
public float getPixelValue(byte[] imageBytes, int x, int y) Get the pixel value as a float from the image and the coordinate- Parameters:
imageBytes
- image bytesx
- x coordinatey
- y coordinate- Returns:
- float pixel value
-
getPixelValues
public float[] getPixelValues(byte[] imageBytes) Get the pixel values of the image as floats- Parameters:
imageBytes
- image bytes- Returns:
- float pixel values
-
validateImageType
Validate that the image type- Parameters:
directory
- file directory
-
getValue
Get the coverage data value- Specified by:
getValue
in classCoverageData<CoverageDataTiffImage>
- Parameters:
griddedTile
- gridded tileimageBytes
- image bytesx
- x coordinatey
- y coordinate- Returns:
- coverage data value
-
getValues
Get the coverage data values- Specified by:
getValues
in classCoverageData<CoverageDataTiffImage>
- Parameters:
griddedTile
- gridded tileimageBytes
- image bytes- Returns:
- coverage data values
-
drawTile
Draw a coverage data image tile from the flat array of float pixel values of length tileWidth * tileHeight where each pixel is at: (y * tileWidth) + x- Parameters:
pixelValues
- float pixel values of length tileWidth * tileHeighttileWidth
- tile widthtileHeight
- tile height- Returns:
- coverage data image tile
-
drawTileData
public byte[] drawTileData(float[] pixelValues, int tileWidth, int tileHeight) Draw a coverage data image tile and format as TIFF bytes from the flat array of float pixel values of length tileWidth * tileHeight where each pixel is at: (y * tileWidth) + x- Parameters:
pixelValues
- float pixel values of length tileWidth * tileHeighttileWidth
- tile widthtileHeight
- tile height- Returns:
- coverage data image tile bytes
-
drawTile
Draw a coverage data image tile from the double array of float pixel values formatted as float[row][width]- Parameters:
pixelValues
- float pixel values as [row][width]- Returns:
- coverage data image tile
-
drawTileData
public byte[] drawTileData(float[][] pixelValues) Draw a coverage data image tile and format as TIFF bytes from the double array of float pixel values formatted as float[row][width]- Parameters:
pixelValues
- float pixel values as [row][width]- Returns:
- coverage data image tile bytes
-
drawTile
public CoverageDataTiffImage drawTile(GriddedTile griddedTile, Double[] values, int tileWidth, int tileHeight) 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- Parameters:
griddedTile
- gridded tilevalues
- coverage data values of length tileWidth * tileHeighttileWidth
- tile widthtileHeight
- tile height- Returns:
- coverage data image tile
-
drawTileData
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- Specified by:
drawTileData
in classCoverageData<CoverageDataTiffImage>
- Parameters:
griddedTile
- gridded tilevalues
- coverage data values of length tileWidth * tileHeighttileWidth
- tile widthtileHeight
- tile height- Returns:
- coverage data image tile bytes
-
drawTile
Draw a coverage data image tile from the double array of coverage data values formatted as Double[row][width]- Parameters:
griddedTile
- gridded tilevalues
- coverage data values as [row][width]- Returns:
- coverage data image tile
-
drawTileData
Draw a coverage data image tile and format as TIFF bytes from the double array of coverage data values formatted as Double[row][width]- Specified by:
drawTileData
in classCoverageData<CoverageDataTiffImage>
- Parameters:
griddedTile
- gridded tilevalues
- coverage data values as [row][width]- Returns:
- coverage data image tile bytes
-
createImage
Create a new image- Parameters:
tileWidth
- tile widthtileHeight
- tile height- Returns:
- image
-
setPixelValue
Set the pixel value into the image- Parameters:
image
- imagex
- x coordinatey
- y coordinatepixelValue
- pixel value
-
createTileTable
Create the coverage data tile table with metadata and extension- Parameters:
geoPackage
- GeoPackagemetadata
- tile table metadata- Returns:
- coverage data
- Since:
- 4.0.0
-