[gdal-dev] why do I get a floating point nodata value from a byte raster?

Richard Sharp richsharp at stanford.edu
Mon Sep 1 21:44:56 PDT 2014


On Fri, Aug 29, 2014 at 10:34 AM, Even Rouault <even.rouault at spatialys.com>
wrote:

> Le jeudi 28 août 2014 23:32:38, Richard Sharp a écrit :
> > I have a byte GTiff dataset that has a nodata value of 0 according to
> QGIS.
>
> Well, I've just created such a file, and with QGIS 1.8, the GUI display
> well
> the -3.4028230607370965e+38 value, but with 2.4, it displays 0. So seems
> to be
> on QGIS side.
> That said,  -3.4028230607370965e+38 doesn't make sense as a nodata value
> for
> Byte, which can only range from 0 to 255.
> After some testing, it seems that QGIS displays 0 when the nodata value is
> out
> of the range of the data type.
>
>
Thanks Evan.  Just so I'm clear, you're saying that the raster had its
nodata value set to something that exceeded its datatype range.  In that
case, it doesn't make sense to interpret the  -3.4028230607370965e+38 as
"0" in the byte range, but rather as a nodata value defined for the valid
pixels in the raster?
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/gdal-dev/attachments/20140901/7482f113/attachment.html>


More information about the gdal-dev mailing list