Possibility of using TIFF encoding with integer datatype for 2d-gridded-coverage
Reading 17-066r2 Geopackage Extension for Tiled Gridded Coverage Data it is unclear to me if it is possible to use TIFF encoding together with values of type integer in conformance with this extension.
In Annex A, Test case ID /extensions/coverage/table_val/tpudt seems to clearly forbid this use:
If datatype is integer, fail if tile_data is not a valid PNG image
but Requirement 13 Req/gpkg-pyramid-user-data-datatype-integer
For data where the datatype column of the corresponding row in the gpkg_2d_gridded_coverage_ancillary table is integer, the tile_data BLOB in the tile pyramid user data table containing tiled, gridded data SHALL be of MIME type image/png or image/tiff. If type png is being used, the data SHALL be 16-bit unsigned integer (single channel - "greyscale").
and Requirement 17 Req/gpkg-tiff-datatype
A` TIFF file storing tiled GeneralGridCoverage, class grid-regular (such as elevation data) SHALL have 32-bit floating (FLOAT - 11) data type or have a binary data type where the SampleFormat has a value of either 1 (unsigned integer) or 2 (signed integer) AND the BitsPerSample is either 8, 16, or 32.
seem to allow this this type of encoding using TIFF.
What is the correct interpretation to have?
Not speaking on behalf the authors, but there are several other mentions in the spec where integer datatype for TIFF is mentioned. That said, from a practical point of view, that's not super interesting as PNG deflate compression + filters are likely going to outperform TIFF LZW compression from a compression rate point of view.
actually clearly identified in https://github.com/opengeospatial/geopackage/issues/552 and https://portal.ogc.org/files/98334#_issue_552_request_ability_to_support_additional_data_types_in_geopackage_coverages as a 1.1 change (and I now realize that GDAL hasn't caught up with that v1.1 extension and only handles TIFF Float32 or PNG 8 and 16 bits (possibly with offset, scale))
Thank you for your answer. I understand this is a possible use but may be not a good practice compared to PNG encoding.
Shouldn't the ATS test /extensions/coverage/table_val/tpudt be modified in order to be consistent with this possible use stated in the standard?