[gdal-dev] Geotiff with bands of different type

Chaitanya kumar CH chaitanya.ch at gmail.com
Tue Aug 10 08:00:41 EDT 2010


Martin,

You could scale the actual values into 'float' values between 0 and 255.
This way you can still have the resolution. Conversion to 8-bit will be
easier.

Use GDALRasterBand::GetOffset() and GDALRasterBand::GetScale() along with
GDALRasterBand::SetOffset() and GDALRasterBand::SetScale()
Docs at http://gdal.org/classGDALRasterBand.html describe how to use these.

On Tue, Aug 10, 2010 at 4:32 PM, Andrew Brooks <arb at sat.dundee.ac.uk> wrote:

> On Tue, 10 Aug 2010 11:46:00 +0100, Martin Raspaud <martin.raspaud at smhi.se>
> wrote:
>
>> We have a satellite image in black and white, which show IR brightness
>> temperatures. The data is scaled between 0 and 255 for viewing, and this
>> is
>> packed in a geotiff file
>>
>> Now some users would like to have the true value of the brightness
>> temperature
>> embedded in the file also.
>>
>
> Maybe you can simulate something close by putting a scale and offset (slope
> and intercept) into the geotiff so you still display 8-bit values but a
> decent
> image viewer will also calculate the true values and give a pixel readout
> of
> the true value under the cursor. I say simulate because 8 bits may not give
> sufficient resolution.
>
> Andrew
>
> _______________________________________________
> gdal-dev mailing list
> gdal-dev at lists.osgeo.org
> http://lists.osgeo.org/mailman/listinfo/gdal-dev
>



-- 
Best regards,
Chaitanya kumar CH.
/tʃaɪθənjə/ /kʊmɑr/
+91-9494447584
17.2416N 80.1426E
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.osgeo.org/pipermail/gdal-dev/attachments/20100810/6d9838a2/attachment.html


More information about the gdal-dev mailing list