[gdal-dev] Saving style/color table inside tiff

Idan Miara idan at miara.com
Mon Oct 30 06:36:43 PDT 2017


Hi,

I would like to ask a few questions regarding color table/style inside
Tiffs (or any other standard raster format for that matter):

1. Single Band Byte Raster without scale/offset - I could a Byte band Tiff
with color table with gdal and load it successfully in QGIS, but if I try
to save a copy of that raster from within QGIS then it doesn't save the
color table, I get a grayscale raster as output.

2. Single Band non-Byte Raster - I could not save a float/int16 raster with
gdal, gdal just ignores the color table commands for non-byte raster. Is
there an option to save a color representation for non-byte raster inside
the raster itself? if not, what is a good practice for that ? is there a
standard cross application raster-style format? I could only see that QGIS
supports QML, which I guess is QGIS specific.

3. Single Band Byte raster with scale/offset - if I set a scale/offset to
my Byte raster then QGIS automatically converts it to Float32 raster upon
loading, I guess it's a QGIS limitation. I could not find a way to
scale/offset the color table itself, thus the raster cannot be colored
correctly with scale/offset. i.e. for scale=2, the raster values are 0-511,
but the color palette is only 0-255 so there is no way to color correctly
the values>255.

Idan.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/gdal-dev/attachments/20171030/a18b351b/attachment.html>


More information about the gdal-dev mailing list