Opened 13 years ago

Closed 12 years ago

Last modified 8 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 12 years ago.
patch for netcdfdataset.cpp

Download all attachments as: .zip

Change History (8)

comment:1 Changed 13 years ago by warmerdam

Cc: mdsumner dnadeau added; mdsummer dnadeau removed

Changed 12 years ago by mdsumner

Attachment: netcdfdataset_highD.patch added

patch for netcdfdataset.cpp

comment:2 Changed 12 years ago by mdsumner

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

comment:3 Changed 12 years ago by mdsumner

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

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

comment:4 Changed 12 years ago by Even Rouault

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

comment:5 Changed 12 years ago by warmerdam

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 Changed 12 years ago by warmerdam

Milestone: 1.5.41.6.4

comment:7 Changed 8 years ago by Even Rouault

Milestone: 1.6.4

Milestone 1.6.4 deleted

Note: See TracTickets for help on using tickets.