Delete object and its attributes from HDF5 file

Dear All,

I have a question regarding deleting an object or dataset (and its
attributes as well) from a HDF5 file.

As far as I know there is no command line tool for this.

As a workaround, I tried to copy all other objects except the one I want to
get rid of in an HDF file to a new HDF file

It worked but this time the attributes of the root group were not copied to
the new file.

And I could not find a way to copy the attributes of the root group to the
new file.

So, I'd like to ask you, if there is a way to get rid of (delete) an
object/objects and its/their attributes in and HDF file

OR, a way/method to copy the attributes of the root group to a new hdf file.

Thanks and Regards,

Hakan

Bu e-posta ve muhtemel eklerinde verilen bilgiler kisiye ozel ve gizli olup, yalnizca mesajda belirlenen alici ile ilgilidir. Bu mesajda bulunan tum fikir ve gorusler ve ekindeki dosyalar sadece adres sahip(ler)ine ait olup, Meteoroloji Genel Mudurlugu hic bir sekilde sorumlu tutulamaz. Meteoroloji Genel Mudurlugu mesajin ve bilgilerinin size degisiklige ugrayarak veya gec ulasmasindan, butunlüğünün ve gizliliğinin korunamamasından, virüs içermesinden ve bilgisayar sisteminize verebileceği herhangi bir zarardan sorumlu tutulamaz.

···

-----
This message and attachments are confidential and intended solely for the individual(s) stated in this message. This email is not intended to impose nor shall it be construed as imposing any legally binding obligation upon Turkish State Meteorological Service and/or any of its subsidiaries or associated companies. Neither Turkish State Meteorological Service nor any of its subsidiaries or associated companies gives any representation or warranty as to the accuracy or completeness of the contents of this email. Turkish State Meteorological Service shall not be held liable to any person resulting from the use of any information contained in this email and shall not be liable to any person who acts or omits to do anything in reliance upon it.

Hi,

You may try to use the h5edit tool to delete/add attributes; see https://www.hdfgroup.org/projects/jpss/h5edit_index.html.

Elena

···

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Elena Pourmal The HDF Group http://hdfgroup.org
1800 So. Oak St., Suite 203, Champaign IL 61820
217.531.6112
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

On Nov 25, 2015, at 5:46 AM, Hakan Koçak <hkocak@mgm.gov.tr<mailto:hkocak@mgm.gov.tr>> wrote:

Dear All,

I have a question regarding deleting an object or dataset (and its attributes as well) from a HDF5 file.
As far as I know there is no command line tool for this.
As a workaround, I tried to copy all other objects except the one I want to get rid of in an HDF file to a new HDF file
It worked but this time the attributes of the root group were not copied to the new file.
And I could not find a way to copy the attributes of the root group to the new file.

So, I’d like to ask you, if there is a way to get rid of (delete) an object/objects and its/their attributes in and HDF file
OR, a way/method to copy the attributes of the root group to a new hdf file.

Thanks and Regards,

Hakan

________________________________
Bu e-posta ve muhtemel eklerinde verilen bilgiler kisiye ozel ve gizli olup, yalnizca mesajda belirlenen alici ile ilgilidir.
Bu mesajda bulunan tum fikir ve gorusler ve ekindeki dosyalar sadece adres sahip(ler)ine ait olup, Meteoroloji Genel Mudurlugu hic bir sekilde sorumlu tutulamaz. Meteoroloji Genel Mudurlugu, mesajin ve bilgilerinin size degisiklige ugrayarak veya gec ulasmasindan, butunlugunun ve gizliliginin korunamamasindan, virus icermesinden ve bilgisayar sisteminize verebilecegi herhangi bir zarardan sorumlu tutulamaz.
________________________________
This message and attachments are confidential and intended solely for the individual(s) stated in this message.
This email is not intended to impose nor shall it be construed as imposing any legally binding obligation upon Turkish State Meteorological Service and/or any of its subsidiaries or associated companies. Neither Turkish State Meteorological Service nor any of its subsidiaries or associated companies gives any representation or warranty as to the accuracy or completeness of the contents of this email. Turkish State Meteorological Service shall not be held liable to any person resulting from the use of any information contained in this email and shall not be liable to any person who acts or omits to do anything in reliance upon it.
________________________________

_______________________________________________
Hdf-forum is for HDF software users discussion.
Hdf-forum@lists.hdfgroup.org<mailto:Hdf-forum@lists.hdfgroup.org>
http://lists.hdfgroup.org/mailman/listinfo/hdf-forum_lists.hdfgroup.org
Twitter: https://twitter.com/hdf5