[gdal-dev] Negative NoData Value with Signed Byte Raster
Even Rouault
even.rouault at spatialys.com
Wed Apr 6 12:10:07 PDT 2016
Le mercredi 06 avril 2016 20:38:36, Jason Greenlaw - NOAA Affiliate a écrit :
> Hello,
>
> I've run into a snag trying to assign a negative NoData value to a Signed
> Byte raster.
Jason,
I've just pushed a fix for that in trunk (signed byte is a bit of a second
class citizen as a data type in GDAL, hence the issues) to avoid the erroneous
clamping. You're supposed to put negative values.
You can workaround the issue by first creating a VRT by adding
<NoDataValue>-128</NoDataValue>
<Metadata>
<MDI key="PIXELTYPE">SIGNEDBYTE</MDI>
</Metadata>
in <VRTRasterBand>
and then gdal_translate the VRT as TIFF
Even
--
Spatialys - Geospatial professional services
http://www.spatialys.com
More information about the gdal-dev
mailing list