opengeospatial / geotiff

18 stars 9 forks source link

Way to distinguish between discrete or continuous data? #113

Open jerstlouis opened 1 year ago

jerstlouis commented 1 year ago

Is there currently a GeoTIFF tag that can be used to tell whether data is discrete (e.g., categorical classification) or continuous (e.g., numerical quantity that can be interpolated)?

Typically discrete data will be stored using a 8-bit or 16-bit integer values with SAMPLEFORMAT_INT or SAMPLEFORMAT_UINT.

However, continuous data can also be stored in 16-bit integers where a multiplier has been applied (e.g., sentinel-2 EO bands).

If there is not currently such a tag or other mechanism to tell, this is a feature request for a future version of GeoTIFF. This distinction is fundamental for the range of the OGC Coverages conceptual model.

desruisseaux commented 1 year ago

I'm not aware of any standard TIFF tag or GeoKey for that. The closest I'm aware of is the non-standard GDAL_METADATA tag, which may contain scale and offset items. The presence of a scale and offset could be interpreted as an indication that the coverage is continuous. As said above, GDAL_METADATA is non-standard and its definition is controlled by the GDAL community.

jerstlouis commented 1 year ago

Thanks Martin. You're right scale and offset might be a good indication of that. I imagine a coverage might also often be continuous without these being present, and the GDAL tags being non-standard, the GeoTIFF SWG should perhaps standardize something like it? There is also the GDAL_NODATA that is quite essential functionality.