[Gdal-dev] floating point bug

Frank Warmerdam warmerdam at pobox.com
Tue May 11 14:06:38 EDT 2004


Thom DeCarlo wrote:
> Frank,
> There is a field in the hdr file called "nbits". The way I understand it,
> this usually has one of three different values.
> 
> If nbits = 16, data is integer.
> If nbits = 32, data is single-precision float
> If nbits = 64, data is double-precision float
> 
> I hope I'm right on this. That's the way I've been using it, anyway.

Thom,

I'm convinced.  I had been treating NBITS=32 as Int32 but I have changed it
to Float32, and added a Float64 case.

Thanks,

---------------------------------------+--------------------------------------
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