Presentation is loading. Please wait.

Presentation is loading. Please wait.

Www.hdfgroup.org The HDF Group November 3-5, 2009HDF/HDF-EOS Workshop XIII1 HDF-Java Products Peter Cao The HDF Group The 13 th HDF and HDF-EOS Workshop.

Similar presentations


Presentation on theme: "Www.hdfgroup.org The HDF Group November 3-5, 2009HDF/HDF-EOS Workshop XIII1 HDF-Java Products Peter Cao The HDF Group The 13 th HDF and HDF-EOS Workshop."— Presentation transcript:

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

2 Outline HDF-Java products Short demo of NPOESS features Full support of HDF5 1.8 in HDF-Java November 3-5, 2009HDF/HDF-EOS Workshop XIII2

3 3-5, 2009HDF/HDF-EOS Workshop XIII3 What are the HDF-Java products? HDF-Java HDF Java Wrapper Object Package Viewer Editor

4 3-5, 2009HDF/HDF-EOS Workshop XIII4 Java Wrapper HDF 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

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

6 3-5, 2009HDF/HDF-EOS Workshop XIII6 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

7 Java Wrapper November 3-5, 2009HDF/HDF-EOS Workshop XIII7 HDF C Native Impl. Java C H5.java h5Imp.c

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

9 3-5, 2009HDF/HDF-EOS Workshop XIII9 Object Package HDF-Java HDF Java Wrapper Object Package Viewer Editor

10 Java Wrapper: read data November 3-5, 2009HDF/HDF-EOS Workshop XIII10 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); Is there an easy way? A very simple example.

11 Object Package: the easy way November 3-5, 2009HDF/HDF-EOS Workshop XIII11 theData = Dataset.read();

12 Object Package: main purposes November 3-5, 2009HDF/HDF-EOS Workshop XIII12 For the application developers Less function calls Easy to extend for specific needs

13 Object Package: basic objects File Dataset Group Attribute Datatype

14 3-5, 2009HDF/HDF-EOS Workshop XIII14 HDFView HDF-Java HDF Java Wrapper Object Package Viewer Editor

15 HDFView November 3-5, 2009HDF/HDF-EOS Workshop XIII15

16 Outline HDF-Java products Short demo of advanced features to support NPOESS data Full support of HDF5 1.8 in HDF-Java November 3-5, 2009HDF/HDF-EOS Workshop XIII16

17 Features to support NPOESS data November 3-5, 2009HDF/HDF-EOS Workshop XIII17 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

18 Outline HDF-Java products Short demo of advanced features to support NPOESS data Full support of HDF5 1.8 in HDF-Java November 3-5, 2009HDF/HDF-EOS Workshop XIII18

19 HDF5 1.8 support November 3-5, 2009HDF/HDF-EOS Workshop XIII19 New capabilities. Performance improvements. Take advantages of HDF5 1.8 library

20 HDF5 1.8 support November 3-5, 2009HDF/HDF-EOS Workshop XIII20 Support HDF5 1.8 APIs in JHI5 Use new APIs in the hdf-java objects Add 1.8 features in HDFView

21 HDF5 1.8 support: New APIs November 3-5, 2009HDF/HDF-EOS Workshop XIII21 HighMediumLow No. of APIs Comp. DateFeb. 2010Mar. 2010?

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

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. November 3-5, 2009HDF/HDF-EOS Workshop XIII23

24 The HDF Group Thank You! Questions/comments? November 3-5, 2009HDF/HDF-EOS Workshop XIII24


Download ppt "Www.hdfgroup.org The HDF Group November 3-5, 2009HDF/HDF-EOS Workshop XIII1 HDF-Java Products Peter Cao The HDF Group The 13 th HDF and HDF-EOS Workshop."

Similar presentations


Ads by Google