I have written a many HDF5 files that are compound data.  They can be
viewed by the HDF viewer and other applications.  The issue I am having is
I cannot seem to get the “H5D.read” command in C# coded correctly.



ForecastRec[] data = new ForecastRec[100000];
int recount = 0;
string FileName = Convert.ToString(myReaderInv["InventoryId"]);

Int32 maxcount = Convert.ToInt32(myReaderInv["MaxCount"]);
string File = @"" + HDF5Path + FileName + ".H5";
//--- HDF5 File Handling -----------------------------------//--
H5.Open();
H5FileId FileId = H5F.open(File, H5F.OpenMode.ACC_RDONLY);    //-- open the
file
H5DataSetId DataSetId = H5D.open(FileId, FileName);         //-- open the
dataset
H5DataSpaceId DataSpaceId = H5D.getSpace(DataSetId);        //--
var DataSetSize = H5S.getSimpleExtentDims(DataSpaceId);     //-- gets the
actual # of rows
var dataType = H5D.getType(DataSetId);
(These are two different attempts but neither will compile.)

H5D.read(DataSetId, dataType, H5Array<byte>(data));
H5D.read(DataSetId, H5T.CreateClass.COMPOUND, H5Array<compound>(data));

Anyone out there that can help?
_______________________________________________
Hdf-forum is for HDF software users discussion.
[email protected]
http://lists.hdfgroup.org/mailman/listinfo/hdf-forum_lists.hdfgroup.org

Reply via email to