Groups & Vdata

classic Classic list List threaded Threaded
4 messages Options
Reply | Threaded
Open this post in threaded view
|

Groups & Vdata

Surya Prakash
Hello,
How to get how many groups and their characteristics of HDF4 file. Also how to get how many Vdata are there and what are their names.

regards
Prakash
Follow Rediff Deal ho jaye! to get exciting offers in your city everyday.

_______________________________________________
Hdf-forum is for HDF software users discussion.
[hidden email]
http://mail.hdfgroup.org/mailman/listinfo/hdf-forum_hdfgroup.org
Reply | Threaded
Open this post in threaded view
|

Re: Groups & Vdata

Binh-Minh Ribler

Hello Prakash,

 

Vgetvgroups and VSgetvdatas will give you the number of vgroups and vdatas in the file, respectively.

Please see this HDF4 User’s Guide for details on them and on vdatas (Chapter 4) and vgroups (Chapter 5):

 

 http://www.hdfgroup.org/ftp/HDF/Documentation/HDF4.2.7/HDF427_UserGd.pdf

 

Thank you,

Binh-Minh


From: [hidden email] [mailto:[hidden email]] On Behalf Of Surya Prakash
Sent: Friday, February 17, 2012 12:07 AM
To: [hidden email]
Subject: [Hdf-forum] Groups & Vdata

 

Hello,
How to get how many groups and their characteristics of HDF4 file. Also how to get how many Vdata are there and what are their names.

regards
Prakash

 

Follow Rediff Deal ho jaye! to get exciting offers in your city everyday.

 


_______________________________________________
Hdf-forum is for HDF software users discussion.
[hidden email]
http://mail.hdfgroup.org/mailman/listinfo/hdf-forum_hdfgroup.org
Reply | Threaded
Open this post in threaded view
|

Re: Groups & Vdata

Surya Prakash
Hello
I was using HDF41r5s, is it not possible to get the info I am looking for in this version?

regards
Prakash

On Fri, 17 Feb 2012 11:06:26 +0530 wrote
>















Hello Prakash,



Vgetvgroups and VSgetvdatas will give you
the number of vgroups and vdatas in the file, respectively.

Please see this HDF4 User’s Guide for
details on them and on vdatas (Chapter 4) and vgroups (Chapter 5):



http://www.hdfgroup.org/ftp/HDF/Documentation/HDF4.2.7/HDF427_UserGd.pdf





Thank you,

Binh-Minh







From:
[hidden email] [mailto:[hidden email]] On Behalf Of Surya Prakash

Sent: Friday, February 17, 2012
12:07 AM

To: [hidden email]

Subject: [Hdf-forum] Groups &
Vdata





Hello,

How to get how many groups and their characteristics of HDF4 file. Also how to
get how many Vdata are there and what are their names.



regards

Prakash














FollowRediff Deal ho jaye!to get exciting offers in your city everyday.











_______________________________________________

Hdf-forum is for HDF software users discussion.

[hidden email]

http://mail.hdfgroup.org/mailman/listinfo/hdf-forum_hdfgroup.org


Follow Rediff Deal ho jaye! to get exciting offers in your city everyday.

_______________________________________________
Hdf-forum is for HDF software users discussion.
[hidden email]
http://mail.hdfgroup.org/mailman/listinfo/hdf-forum_hdfgroup.org
Reply | Threaded
Open this post in threaded view
|

Re: Groups & Vdata

Ruth Aydt
Administrator
Depending on how you want to use the information, you could also create a Content Map (and XML document) for the file and then use a tool like "grep" to count the number of occurrences of Vdata (Tables) and Vgroups (Groups) in the Map.

You can find the h4mapwriter distribution, and more information about HDF4 File Content Maps, at
http://www.hdfgroup.org/projects/h4map/

In general you would do something like:

$ h4mapwriter file.hdf file.hdf.map.xml
$ grep "h4:Table name=" file.hdf.map.xml > file.Vdata
$ wc -l file.Vdata
21 file.Vdata
$ grep "h4:Group name=" file.hdf.map.xml > file.Vgroups
$ wc -l file.Vgroups
4 file.Vgroups

You can also look at the content of file.Vgroups or file. Vdata or file.hdf.map.xml to see more about the objects in the original HDF4 file.

$ cat file.Vgroups
        <h4:Group name="L2_Support_atmospheric&amp;surface_product" path="/" class="SWATH" id="ID_G1">
            <h4:Group name="Geolocation Fields" path="/L2_Support_atmospheric&amp;surface_product" class="SWATH Vgroup" id="ID_G2">
            <h4:Group name="Data Fields" path="/L2_Support_atmospheric&amp;surface_product" class="SWATH Vgroup" id="ID_G3">
            <h4:Group name="Swath Attributes" path="/L2_Support_atmospheric&amp;surface_product" class="SWATH Vgroup" id="ID_G4">

The link above will also take you to the schema for the Map files.

If you want to use the number of Vdata & Vgroups programatically, the HDF4 APIs are probably the way to go.  If you just want to find out what's in the file, mapping it or using an HDF4 utility like "hdp" may be worth exploring.

-- Ruth