3

What is the band value is > 255?

I am new to GeoTIFF, I have read through the document and came to know the RGB value can be between 0-255. But while working on one of the file, I found that value is > 255 (SS 01). Any reason why it is > 255 and what is the purpose of it?

SS 01 enter image description here

SS 02 enter image description here

1 Answer 1

7

GeoTIFF files don't have to represent RGB colour images. They are general data-storage rasters, and bands can contain any numerical values, including decimals, negative numbers, things bigger than 255, bigger than 10,000,000, smaller than -9999 and so on. A band could be altitude in metres.

If this file is supposed to be interpreted as an RGB image then it may be a high dynamic range RGB image, with maybe 16 bits per channel. You'll have to check the documentation for that, and then set the min/max for each of the three channels corresponding to the colours.

The scale of 0 to 255 is a common convention because 0 to 255 can be encoded in 8 binary bits which packs nicely into a byte. But that only leaves you 256 shades of each colour which might not be fine enough for some applications.

2
  • Thank you so much. Could you please share ideal resource for understanding how geotiff viewer decide/calculate the color for a pixel.?
    – Shashidhar
    Feb 28 at 4:39
  • What "geotiff viewer"? Do you mean how does QGIS display a raster? That's the raster layer symbology dialog that you have in front of you, see the QGIS help for details.
    – Spacedman
    Feb 28 at 9:47

Your Answer

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

Not the answer you're looking for? Browse other questions tagged or ask your own question.