[gdal-dev] Errors writing GeoTIFF with NBITS=1
Even Rouault
even.rouault at spatialys.com
Tue Jun 18 08:02:24 PDT 2019
On mardi 18 juin 2019 14:17:16 CEST Schmitz, Uwe wrote:
> Hi Folks,
>
> with gdal 2.4.0 I get errors doing the following:
>
> gdal_translate \
> -co COMPRESS=PACKBITS \
> -co NBITS=1 \
> -co PHOTOMETRIC=MINISWHITE \
> -co PROFILE=GeoTIFF \
> -a_srs epsg:25832 \
> src.tif \
> dst.tif<CR>
> Input file size is 4000, 4000
> ERROR 6: dst.tif, band 1: SetOffset() not supported on this raster band.
> ERROR 6: dst.tif, band 1: SetScale() not supported on this raster band.
> ERROR 6: dst.tif, band 1: SetUnitType() not supported on this raster band.
> 0...10...20...30...40...50...60...70...80...90...100 - done.
>
> src.tif is also GeoTIFF with NBITS=1, COMPRESS=PACKBITS etc.
> but dst.tif seems to be the problem.
> A search showed me that I can prevent the errors by setting:
> export GDAL_PAM_ENABLED=YES
>
> Is this intended?
I can only reproduce the error messages you get by explictly setting
GDAL_PAM_ENABLED=NO (GDAL_PAM_ENABLED=YES being the default)
Explicitly disabling PAM will lead to such, generally non critical, warnings/
errors when PAM features are needed. That said, for that particular case, I've
just pushed a fix in the GTiff driver to avoid the error messages to be
emitted, but you could encounter them in a number of other places.
Even
--
Spatialys - Geospatial professional services
http://www.spatialys.com
More information about the gdal-dev
mailing list