|
#1
|
|||
|
|||
|
************************************************** *****************************
Mark S. Solomon Email: solomon@lyta.gsfc.nasa.gov EOS Data Gateway Development Team http://eos.nasa.gov/imswelcome Global Science & Technology, Inc. Aerospace Building 10210 Greenbelt Road, Suite 500 Phone - 301-867-2068 Lanham, Maryland 20706-2218 Fax - 301-867-2148 ************************************************** ***************************** ---------- Forwarded message ---------- Date: Tue, 18 Sep 2001 18:08:03 -0400 From: "Robert Edmonds, Jr." <Robert_Edmonds@SESDA.com> To: Thea Roberts <thea_roberts@SESDA.com>, Northcutt <tom_northcutt@SESDA.com>, Amrhein <james_amrhein@SESDA.com>, Feng <zhong_feng@SESDA.com>, Ma <liqun_ma@SESDA.com>, Harberts <robert_harberts@SESDA.com>, pvanwie@SESDA.com, *Castle <james_castle@SESDA.com>, Nestler <mark_nestler@SESDA.com>, Seufert <seufert@mindspring.com>, Rau <ramesh_rau@SESDA.com>, McMahon <joseph_mcmahon@SESDA.com>, Marsans <lorena_marsans@SESDA.com>, Solomon <solomon@lyta.gsfc.nasa.gov>, Duong <lind@rattler-e.gsfc.nasa.gov>, Newman <newman@gst.com>, Onashoga <larry_onashoga@SESDA.com>, Touart <geralyn_touart@SESDA.com>, *Krupp <brian_krupp@SESDA.com>, Yin <zhangshi_yin@SESDA.com>, *Wanchoo <lalit_wanchoo@SESDA.com>, Rahabi <amer_rahabi@SESDA.com>, Corprew <frank_corprew@SESDA.com>, Farnham <jennifer_farnham@SESDA.com>, Rabi <muhammad_rabi@SESDA.com>, Yang <jingli_yang@SESDA.com>, *Agbu <patrick_agbu@SESDA.com>, Manion <david_manion@SESDA.com>, *prasad <urmila_prasad@SESDA.com>, *Sagar <vidya_sagar@SESDA.com>, *Schwenke <george_schwenke@SESDA.com>, *Shukla <pooran_shukla@SESDA.com>, *Chang <hyoduck_chang@SESDA.com>, *Cheng <leslie_cheng@SESDA.com>, *Chang <chao-hsi_chang@SESDA.com>, Murphy <kevin_murphy@SESDA.com>, karen_cobb@SESDA.com Subject: Anyone familiar with VData tables in HDF? We're having a problem with some old software that attempts to set up a Vdata table using HDF functions VSsetfields(), VSsetname() and Vinsert(). If anyone happens to be familiar with the process of initializing VData tables, please send me some email, as you could probably save us a great deal of time diagnosing this! RE * * * * * * * * * This message was forwarded by the eostools listserver maintained by the ESDIS Project using MajorDomo Verion 1.94.4. Any opinions expressed above are those of the original author, not NASA. |
|
#2
|
|||
|
|||
|
> Subject: Anyone familiar with VData tables in HDF?
> > We're having a problem with some old software that attempts to set up a > Vdata table using HDF functions VSsetfields(), VSsetname() and > Vinsert(). If anyone happens to be familiar with the process of > initializing VData tables, please send me some email, as you could probably > save us a great deal of time diagnosing this! > RE > First, Vinsert is for Vgroups, not Vdata. You should use VSwrite to (obviously) write a Vdata. Here is a sample: #include "hdf.h" main(int argc, char *argv[]) { intn status; int32 Hid, VSid; uint8 *buffer; /* Open and create file (0 = default number of data descriports per block) */ Hid = Hopen(argv[1], DFACC_CREATE, 0); /* Initialize the V interface */ status = Vstart(Hid); /* Initialize the VS interface, index -1 (create new) for Vdata */ VSid = VSattach(Hid, -1, "w"); /* Set name for this Vdata */ status = VSsetname(VSid, "Vset_1"); /* Define and set the field names for this Vdata */ status = VSfdefine(VSid, "Field_1", DFNT_FLOAT32, 1); status = VSfdefine(VSid, "Field_2", DFNT_INT16, 5); status = VSfdefine(VSid, "Field_3", DFNT_FLOAT64, 1); status = VSfdefine(VSid, "Field_4", DFNT_UINT8, 20); status = VSsetfields(VSid, "Field_1,Field_2,Field_3,Field_4"); /* Optionally, you could define some field level and/or Vdata table level * attributes with VSsetattr */ /* Allocate memory for the Vdata */ buffer = calloc(10, 1*sizeof(float32) + 5*sizeof(int16) + 1*sizeof(float64) + 20*sizeof(uint8)); /* Write out the Vdata */ status = VSwrite(VSid, buffer, 10, FULL_INTERLACE); free(buffer); /* Detach from the Vdata */ status = VSdetach(VSid); /* Shut down the V interface */ status = Vend(Hid); /* Finally, close the file */ status = Hclose(Hid); exit(0); } -- ------------------------------------------------------------------------------ | James E. Johnson | address: | | Science Systems and Applications, Inc.| NASA Goddard Space Flight Center | | e-mail: jjohnson@daac.gsfc.nasa.gov | Distributed Active Archive Center | | phone: 301-614-5121 | Code 902, Building 32, Room S130F | | fax: 301-614-5268 | Greenbelt, MD 20771 | ------------------------------------------------------------------------------ * * * * * * * * * This message was forwarded by the eostools listserver maintained by the ESDIS Project using MajorDomo Verion 1.94.4. Any opinions expressed above are those of the original author, not NASA. |