[gdal-dev] gdal_translate -unscale option

Frank Warmerdam warmerdam at pobox.com
Thu Dec 31 15:41:11 EST 2009


Folks,

I have added the -unscale option to gdal_translate.  Some image formats
compact pixel values by subtracting an offset and rescaling - for instance
to fit floating point values into 16bit pixels.  The scaling and offset
can be carried with the data model, and are accessable via the GetOffset()
and GetScale() methods on the GDALRasterBand.

However, till now there was no explicit way to convert the pixel values
back to their original domain.  The new -unscale value basically
applies the scale and offset as part of the translation and then clears
these metadata in the output image.

This feature will appear in GDAL 1.7.

Best regards,
-- 
---------------------------------------+--------------------------------------
I set the clouds in motion - turn up   | Frank Warmerdam, warmerdam at pobox.com
light and sound - activate the windows | http://pobox.com/~warmerdam
and watch the world go round - Rush    | Geospatial Programmer for Rent



More information about the gdal-dev mailing list