1 / 24

HDF-Java Products

HDF-Java Products. Peter Cao The HDF Group The 13 th HDF and HDF-EOS Workshop November 3-5, 2009. Outline. HDF-Java products Short demo of NPOESS features Full support of HDF5 1.8 in HDF-Java.

Download Presentation

HDF-Java Products

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. HDF-Java Products Peter Cao The HDF Group The 13th HDF and HDF-EOS Workshop November 3-5, 2009 HDF/HDF-EOS Workshop XIII

  2. Outline HDF-Java products Short demo of NPOESS features Full support of HDF5 1.8 in HDF-Java HDF/HDF-EOS Workshop XIII

  3. What are the HDF-Java products? HDF-Java HDF Java Wrapper Object Package Viewer Editor HDF/HDF-EOS Workshop XIII

  4. Java Wrapper Pure Java Library HDF JNI a programming framework that allows Java code to call and be called by applications and libraries written in other languages NetCDF-Java library HDF HDF/HDF-EOS Workshop XIII

  5. Pure Java Library • Pros: • True platform independence • Direct access to file (no data conversion between C and Java) Pure Java Library • Cons: • Substantial amount of work to support features in the C library. HDF HDF/HDF-EOS Workshop XIII

  6. HDF JNI • Pros: • Easy to implement • Easy to keep up with the library changes HDF • Cons: • Requires data conversion between C and Java • The JNI is platform dependent HDF HDF/HDF-EOS Workshop XIII

  7. Java Wrapper C Java C Native Impl. HDF h5Imp.c H5.java HDF/HDF-EOS Workshop XIII

  8. Java Wrapper: C versus Java C Java public static native int H5Fopen ( String name, int flags, int access_id); hid_t H5Fopen ( const char *name, unsigned flags, hid_t access_id ); HDF/HDF-EOS Workshop XIII

  9. Object Package HDF-Java HDF Java Wrapper Object Package Viewer Editor HDF/HDF-EOS Workshop XIII

  10. Java Wrapper: read data A very simple example. Is there an easy way? int fid, did, sid, tid, rank; long dims[], maxDims[]; Object theData; fid = H5.H5Fopen( fname, HDF5Constants.H5F_ACC_RDWR, HDF5Constants.H5P_DEFAULT); did = H5.H5Dopen(fid, dname); sid = H5.H5Dget_space(did); tid = H5.H5Dget_type(did); rank = H5.H5Sget_simple_extent_ndims(sid); dims = new long[rank]; maxDims = new long[rank]; H5.H5Sget_simple_extent_dims(sid, dims, maxDims); theData = allocateArray(tid, dims); H5.H5Dread( did, tid, HDF5Constants.H5S_ALL, HDF5Constants.H5S_ALL, HDF5Constants.H5P_DEFAULT, theData); H5.H5Sclose(sid); H5.H5Tclose(tid); H5.H5Dclose(did); H5.H5Fclose(fid); HDF/HDF-EOS Workshop XIII

  11. Object Package: the easy way theData = Dataset.read(); HDF/HDF-EOS Workshop XIII

  12. Object Package: main purposes For the application developers • Less function calls • Easy to extend for specific needs HDF/HDF-EOS Workshop XIII

  13. Object Package: basic objects File Group Dataset Datatype Attribute http://www.hdfgroup.org/hdf-java-html/hdf-object/

  14. HDFView HDF-Java HDF Java Wrapper Object Package Viewer Editor HDF/HDF-EOS Workshop XIII

  15. HDFView HDF/HDF-EOS Workshop XIII

  16. Outline HDF-Java products Short demo of advanced features to support NPOESS data Full support of HDF5 1.8 in HDF-Java HDF/HDF-EOS Workshop XIII

  17. Features to support NPOESS data • Aggregated granules • dataset pointed by an object reference • Granules • Subset pointed a region reference • Quality Flags • bits of quality flags packed in one byte • HDFView version 2.5 patch 3 http://www.hdfgroup.org/ftp/HDF5/hdf-java/v25p3/ HDF/HDF-EOS Workshop XIII

  18. Outline HDF-Java products Short demo of advanced features to support NPOESS data Full support of HDF5 1.8 in HDF-Java HDF/HDF-EOS Workshop XIII

  19. HDF5 1.8 support Take advantages of HDF5 1.8 library New capabilities. Performance improvements. HDF/HDF-EOS Workshop XIII

  20. HDF5 1.8 support www.hdfgroup.uiuc.edu/RFC/HDF5/hdf-java/ Support HDF5 1.8 APIs in JHI5 Use new APIs in the hdf-java objects Add 1.8 features in HDFView HDF/HDF-EOS Workshop XIII

  21. HDF5 1.8 support: New APIs HDF/HDF-EOS Workshop XIII

  22. HDF5 1.8 support: possible changes • Package names • “org.hdfgroup.hdf.” • “hdf.” • “ncsa.hdf.” • Class structure • H5, H5D, H5F, etc. HDF/HDF-EOS Workshop XIII

  23. Acknowledgements This work was supported by cooperative agreement number NNX08AO77A from the National Aeronautics and Space Administration (NASA). Any opinions, findings, conclusions, or recommendations expressed in this material are those of the author[s] and do not necessarily reflect the views of the National Aeronautics and Space Administration. HDF/HDF-EOS Workshop XIII

  24. Thank You!Questions/comments? HDF/HDF-EOS Workshop XIII

More Related