Re: pure java HDF reader
Posted by williamfgc on
URL: http://imagej.273.s1.nabble.com/pure-java-HDF-reader-tp3689613p3689616.html
Thanks, so far I've been using JNI and NCSA libraries in C, 'cause I have to read HDF5 files that have the attributes that netCDF-4 can't access (read the list below). It's pure Java for what you mentioned, but I can't read all HDF5 files that I need with netCDF. What I stated has a lot of truth.
My question is: how hard would it be to download the source code in C (from HDFgroup) and make it pure Java since they claim that the advantage of HDF files is in their code and not the files themselves.
Thanks!
From their website:
NetCDF-4 intentionally supports a simpler data model than HDF5, which means there are HDF5 files that cannot easily be converted to netCDF-4, including files that make use of features in the following list:
* Multidimensional data that doesn't use shared dimensions implemented using HDF5 "dimension scales". (This restriction will be eliminated in netCDF 4.1, permitting access to HDF5 datasets that don't use dimension scales.)
* Non-hierarchical organizations of Groups, in which a Group may have multiple parents or may be both an ancestor and a descendant of another Group, creating cycles in the subgroup graph. In the netCDF-4 data model, Groups form a tree with no cycles, so each Group (except the top-level unnamed Group) has a unique parent.
* HDF5 "references" which are like pointers to objects and data regions within a file. The netCDF-4 data model omits references.
* Additional primitive types not included in the netCDF-4 data model, including H5T_TIME, H5T_BITFIELD, and user-defined atomic types.
* Multiple names for data objects such as variables and groups. The netCDF-4 data model requires that each variable and group have a single distinguished name.
* Attributes attached to user-defined types.
* Stored property lists
* Object names that begin or end with a space
If you know that an HDF5 file conforms to the netCDF-4 enhanced data model, either because it was written with netCDF function calls or because it doesn't make use of HDF5 features in the list above, then it can be accessed using netCDF-4, and analyzed, visualized, and manipulated through other applications that can access netCDF-4 files.
A tool has been developed to convert HDF5-EOS Aura files to netCDF-4 files, and it is currently undergoing testing and documentation before release on the HDF5 web site.