Opened 14 years ago

Closed 13 years ago

Last modified 9 years ago

#2583 closed defect (fixed)

[PATCH] five dimensional file image access fails for some dimensions

Reported by: warmerdam Owned by: warmerdam
Priority: normal Milestone:
Component: GDAL_Raster Version: svn-trunk
Severity: normal Keywords: netcdf
Cc: mdsumner, dnadeau

Description

Attempts to read image data from bands 5 to 8 in the file:

http://staff.acecrc.org.au/~mdsumner/gdal/foo.nc

results in errors like:

ERROR 1: netCDF scanline fetch failed: Index exceeds dimension bound
ERROR 1: IReadBlock failed at X offset 0, Y offset 0
ERROR 1: netCDF scanline fetch failed: Index exceeds dimension bound
ERROR 1: IReadBlock failed at X offset 0, Y offset 1

and all imagery comes back zeros.

I tested with trunk.

Attachments (1)

netcdfdataset_highD.patch (1.8 KB ) - added by mdsumner 13 years ago.
patch for netcdfdataset.cpp

Download all attachments as: .zip

Change History (8)

comment:1 by warmerdam, 14 years ago

Cc: mdsumner dnadeau added; mdsummer dnadeau removed

by mdsumner, 13 years ago

Attachment: netcdfdataset_highD.patch added

patch for netcdfdataset.cpp

comment:2 by mdsumner, 13 years ago

I uploaded a patch to fix this. It allows this file and other 5D and above NetCDF files to be read correctly.

comment:3 by mdsumner, 13 years ago

I uploaded an R example to generate a file for testing.

http://trac.osgeo.org/gdal/attachment/wiki/CodeSnippets/netCDF-5D.R

comment:4 by Even Rouault, 13 years ago

Summary: five dimensional file image access fails for some dimensions[PATCH] five dimensional file image access fails for some dimensions

comment:5 by warmerdam, 13 years ago

Resolution: fixed
Status: newclosed

Patch tested and applied in trunk (r18148) and 1.6 branch (r18150). A test added in trunk (r18149).

Thanks!

comment:6 by warmerdam, 13 years ago

Milestone: 1.5.41.6.4

comment:7 by Even Rouault, 9 years ago

Milestone: 1.6.4

Milestone 1.6.4 deleted

Note: See TracTickets for help on using tickets.