[Gdal-dev] RE: Strange NoData value from a MrSID image (Peng Gao)
Frank Warmerdam
fwarmerdam at gmail.com
Fri Jun 24 12:03:10 EDT 2005
On 6/23/05, Michael P. Gerlek <mpg at lizardtech.com> wrote:
> 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 :-)
Michael,
Ah! Thanks, I'll fix that. This would certainly explain why Peng was
getting junk values.
... I see Andrey has beat me to it. Thank goodness for CVS reporting
via IRC.
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