[gdal-dev] Writing support for netCDF, HDF4, HDF5

Even Rouault even.rouault at mines-paris.org
Thu Jul 30 15:27:17 EDT 2009


Le Thursday 30 July 2009 20:43:48 Mikhail Itkin, vous avez écrit :
> Hi,
>
> Is it possible to write HDF5 files with gdal?

No, this was an error in the format page. Rectified now.

> Is it possible to create 
> NetCDF files without having a "prototype" file?

Not sure what you mean by a prototype file : a source dataset for 
CreateCopy() ? NetCDF has only CreateCopy() implemented, so you need a source 
dataset

>
> I am currently trying how GDAL works with python, to see if it can fit
> our research group needs. All three formats NetCDF, HDF4 and HDF5 have
> writing support according to the description on the gdal.org. However
> it's not that easy to find how it really works.
>
> After reading GDAL API tutorial i found that HDF4 driver doesn't have
> neither Create() nor CreateCopy() methods, netCDF has only CreateCopy(),
> and HDF5 doesn't have any. And surprisingly there is another driver,
> called "HDF4Image" which does have Create method.
>
> I have put a short summary here:
> http://wiki.zmaw.de/mpimet/MikhailItkin/WorkAndCodeNotes/Gdal/DataFormats
>
> Does this mean creating HDF5 by gdal means is not possible at the
> moment?

> What is the difference between HDF4 and HDF4Image? 

HDF4 can report several subdatasets, which are opened by the HDF4Image driver. 
To create a HDF4 dataset, you must use Create()/CreateCopy() on the HDF4Image 
driver.

>
> Sorry, i am only a beginner in using gdal and any help or pointers to
> related documentation is appreciated.

You can look at several examples in GDAL python autotest suite :

http://trac.osgeo.org/gdal/browser/trunk/autotest/gcore/hdf4_read.py
http://trac.osgeo.org/gdal/browser/trunk/autotest/gcore/hdf4_write.py
http://trac.osgeo.org/gdal/browser/trunk/autotest/gdrivers/netcdf.py
http://trac.osgeo.org/gdal/browser/trunk/autotest/gdrivers/hdf5.py

>
> Regards,
> Mikhail
> _______________________________________________
> gdal-dev mailing list
> gdal-dev at lists.osgeo.org
> http://lists.osgeo.org/mailman/listinfo/gdal-dev




More information about the gdal-dev mailing list