[Gdal-dev] RE: Strange NoData value from a MrSID image (Peng Gao)

Michael P. Gerlek mpg at lizardtech.com
Thu Jun 23 15:59:10 EDT 2005


Peng Gao wrote:

> GDAL returns a strange NoData value (-1.2197742815800439e-012)
> from one of my mrSID images. The image is 8-bit and has 3 bands.
>
> MrSIDRasterBand::MrSIDRasterBand( MrSIDDataset *poDS, int nBand )
> {
>   ...
>   dfNoDataValue = poDS->poNDPixel->getSampleValueFloat32( nBand - 1 );
>   ...

If this is 8-bit data, then we should be using getSampleValueUint8(),
not getSampleValueFloat32().

The "datatype" in those function name refers to the underlying datatype
of the sample, not the desried return type or such.  I think I even
documented that :-)

-mpg

-----------------------------------
Michael P. Gerlek
Software Architect / MrSID team
mpg at lizardtech.com
LizardTech, a Celartem company
Seattle, Washington
-----------------------------------



More information about the Gdal-dev mailing list