Changes between Initial Version and Version 7 of Ticket #1176


Ignore:
Timestamp:
Apr 1, 2007 1:07:53 PM (12 years ago)
Author:
warmerdam
Comment:

I have added the following check in netCDFDataset::Open() which I think will do the trick. Currently the change is only in trunk, but I'll move it into the 1.4 branch once I have a chance to add a test suite entry for netcdf.

/* -------------------------------------------------------------------- */ /* Does this appear to be a netcdf file? */ /* -------------------------------------------------------------------- */

if( !EQUALN(poOpenInfo->pszFilename,"NETCDF:",7)

&& ( poOpenInfo->nHeaderBytes < 5

!EQUALN((const char *) (poOpenInfo->pabyHeader),"CDF\001",5)))

return NULL;

Legend:

Unmodified
Added
Removed
Modified
  • Ticket #1176

    • Property Summary changed from new Idrisi support doesn't work with NetCDF enabled to NetCDF Driver picks up zero length files
    • Property Milestone changed from to 1.4.1
  • Ticket #1176 – Description

    initial v7  
     1When NetCDF support is built into GDAL, the Idrisi driver can't write RST files.  Reading works.  When using gdal_translate to write an Idrisi file (or in the gdalautotest), it gives an assertion error:
     2
    13{{{
    2 When NetCDF support is built into GDAL, the Idrisi driver can't write RST files.  Reading works.  When
    3 using gdal_translate to write an Idrisi file (or in the gdalautotest), it gives an assertion error:
    4 
    54gdal_translate -of RST rgbsmall.tif asdf.rst
    65Input file size is 50, 50
    760posixio.c:396: failed assertion `extent != 0'
    87Abort trap
     8}}}
    99
    10 I thought it may have something to do with OS X threads (from the posicio.c reference), but disabling
    11 threads in gdal didn't help - same error.
    12 }}}
     10I thought it may have something to do with OS X threads (from the posicio.c reference), but disabling threads in gdal didn't help - same error.