4

I checked the official GeoTIFF documentations and there is no reference to color maps. Regardless, I see color maps or tables referenced everywhere, including in other questions.

I am aware that a GeoTIFF can be converted into a RGBA GeoTIFF, but this would simply be a completely different GeoTIFF with the original information lost, unless the legend is also saved separately.

I am asking if there is a way to not change the values of the GeoTIFF and to include in it a threshold based color map (or maybe a rule based one) that can be later interpreted by most software correctly.

6
  • GDAL provides the possibility of adding a color table to a GeoTIFF file. Take a look at gis.stackexchange.com/a/325751/86131. Commented Aug 9, 2020 at 20:29
  • 1
    The GeoTIFF standard only specifies georeferencing docs.opengeospatial.org/is/19-008r4/19-008r4.html#_scope. Colour table support is software dependent.
    – user2856
    Commented Aug 9, 2020 at 21:49
  • @MarceloVilla-Piñeros, just based on the input parameters SetColorEntry only allows an integer value and a triple of integers for the rgb. Apart from the fact that I would need to specify the very same colour for a lot of values for a threshold based visualization, I would also need to convert my values to integers and in effect, lose the original values. The way I see it, this would not be a color table linked to values, but just colors stored in an indexed way. If you're lucky to match the Index palette to your values, then it works, but it's not a general purpose color table.
    – Andrei
    Commented Aug 10, 2020 at 12:17
  • 1
    TIFF supports color tables and GeoTIFF does not change that awaresystems.be/imaging/tiff/tifftags/colormap.html
    – user30184
    Commented Aug 10, 2020 at 23:15
  • @user30184 That is a very limited color map, and it doesn't work with all tiffs (e.g. tiffs with float values). Also, the lookup table needs to be explicit. This is, at best, a very limited implementation of color tables. I can't know the intentions of this implementations, but it seems to be just a compressing technique using colormaps, and not a true colormap implementation.
    – Andrei
    Commented Aug 21, 2020 at 10:05

0

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Browse other questions tagged or ask your own question.