[gdal-dev] Vertical scaling during warping

John Donovan j.donovan at virtalis.com
Thu Feb 12 05:25:48 EST 2009


Hi,
We have our own image format that is (among others) single-band 16-bit
unsigned height values. I've written a program to convert from the many
native GDAL formats to our format using ChunkAndWarpImage().

Everything is fine except when converting from a floating-point format.
I was expecting GDAL to do something with the scale and offset values
when warping, but it doesn't call our format's GetScale()/GetOffset()
functions at all, so consequently the fractional part of the input data
is truncated.

I'm willing to accept that my code could be at fault, so I'm open to any
and all suggestions. The only one I can think of, and I'd rather not do
it, is to tell GDAL our format is floating point, and do the scaling
manually in IWriteBlock(). But as the format can support floating point
values, it would make that code path not as clean as I would like.

Regards,
John Donovan - Programmer, Virtalis Ltd.

______________________________________________________________________
This email has been scanned for Virtalis Ltd by the MessageLabs Email Security System. ______________________________________________________________________


More information about the gdal-dev mailing list