#5053 closed defect (fixed)
netcdf driver cannot read netcdf-4 files with UBYTE data
Reported by: | etourigny | Owned by: | etourigny |
---|---|---|---|
Priority: | normal | Milestone: | 1.10.1 |
Component: | GDAL_Raster | Version: | svn-trunk |
Severity: | normal | Keywords: | |
Cc: |
Description
Files that are of unsigned byte data type in the NC4 (netcdf-4) format are incorrectly read. To reproduce do the following
$ gdal_translate -of netcdf -co FORMAT=NC4 byte.tif byte.nc $ gdalinfo -checksum byte.nc [...] ERROR 1: netCDF scanline fetch failed: #-60 (NetCDF: Numeric conversion not representable) ERROR 1: byte.nc, band 1: IReadBlock failed at X offset 0, Y offset 0 ERROR 1: GetBlockRef failed at X block offset 0, Y block offset 0 ERROR 3: Checksum value couldn't be computed due to I/O read error. Checksum=0
The problem does not appear when files are saved in netcdf-4 classic format, because it uses NC_BYTE and not NC_UBYTE.
Also, metadata (such as missval) is not supported if a variable is not stored in NC_UBYTE type.
GDAL_netCDF: NCDFGetAttr unsupported type 7 for attribute _FillValue
Attachments (2)
Change History (9)
by , 11 years ago
Attachment: | patch-ubyte-autotest1.txt added |
---|
comment:1 by , 11 years ago
Status: | new → assigned |
---|
Attached patches to test and fix the 2 bugs found - waiting to commit before 1.10-RC2 is voted.
comment:2 by , 11 years ago
You can still commit that in trunk for now. And backport later if appropriate
comment:3 by , 11 years ago
ok - I guess this will not impact 1.10 release, even if rc2 is not promoted to final? I will backport to 1.10 after that. thanks
comment:4 by , 11 years ago
If another rc is needed, it will be based on 1.10 branch, not trunk, so commits in trunk are OK.
comment:5 by , 11 years ago
comment:6 by , 11 years ago
Resolution: | → fixed |
---|---|
Status: | assigned → closed |
comment:7 by , 11 years ago
Milestone: | → 1.10.1 |
---|
patch for autotest