[gdal-dev] -if netCDF fails to read Matlab .mat files

Joaquim Manuel Freire Luís jluis at ualg.pt
Mon Apr 18 09:31:23 PDT 2022


Hi,

Matlab creates files in what they call the "mat" format (with a .mat extension) but which in fact are files in netCDF/HDF

And indeed we can read them ... but only if renamed to .nc

Why is this failing?

$ gdalinfo -if netCDF windaa.mat
ERROR 4: `windaa.mat' not recognized as a supported file format.
gdalinfo failed - unable to open 'windaa.mat'.

But this works

$ gdalinfo windaa.nc
Driver: netCDF/Network Common Data Format
Files: windaa.nc
Size is 512, 512
Subdatasets:
  SUBDATASET_1_NAME=NETCDF:"windaa.nc":u
  SUBDATASET_1_DESC=[15x41x35] u (64-bit floating-point)
  SUBDATASET_2_NAME=NETCDF:"windaa.nc":v
  SUBDATASET_2_DESC=[15x41x35] v (64-bit floating-point)
...



Joaquim
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/gdal-dev/attachments/20220418/78ec0acf/attachment.html>


More information about the gdal-dev mailing list